* Update reusable workflows docs * Update content/actions/learn-github-actions/reusing-workflows.md Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com> * Update content/actions/learn-github-actions/reusing-workflows.md * Update content/actions/learn-github-actions/reusing-workflows.md * Update content/actions/learn-github-actions/reusing-workflows.md Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com> * Update content/actions/learn-github-actions/reusing-workflows.md Co-authored-by: Martin Lopes <martin389@github.com> * Apply review suggestion from Lucas * Update content/actions/learn-github-actions/reusing-workflows.md Co-authored-by: Martin Lopes <martin389@github.com> * Update content/actions/learn-github-actions/reusing-workflows.md Co-authored-by: Martin Lopes <martin389@github.com> * Update content/actions/learn-github-actions/reusing-workflows.md Co-authored-by: Martin Lopes <martin389@github.com> * Add information about use of runners As per review comment from Ajay Krishna Nalisetty * Update content/actions/learn-github-actions/workflow-syntax-for-github-actions.md Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com> * Update content/actions/learn-github-actions/workflow-syntax-for-github-actions.md * Fix version as per Lucas's review comment * Explain using environment secrets * Add workflow diagram * Move explanation of diagram above it * Slight change to job_workflow-ref description Include the syntax of the response data, as per https://github.slack.com/archives/C01SMLA6MNY/p1637731982336700 * Clarify difference between repo and job_workflow_ref Co-authored-by: Lucas Costi <lucascosti@users.noreply.github.com> Co-authored-by: Martin Lopes <martin389@github.com> Co-authored-by: Octomerger Bot <63058869+Octomerger@users.noreply.github.com>
Reusables
Reusables are long strings of reusable text.
Reusables are longer strings like paragraphs or procedural lists that can be referenced in multiple content files. Using Markdown (instead of YAML) makes it possible for our localization pipeline to split the strings into smaller translatable segments, leading to fewer translation errors and less churn when the source English content changes.
Each reusable lives in its own Markdown file.
The path and filename of each Markdown file determines what its path will be in the data object.
For example, a file named /data/reusables/foo/bar.md will be accessible as {% data reusables.foo.bar %} in pages.
Reusable files are divided generally into directories by task. For example, if you're creating a reusable string for articles about GitHub notifications, you'd add it in the directory data/reusables/notifications/ in a file named data/reusables/notifications/your-reusable-name.md. The content reference you'd add to the source would look like {% data reusables.notifications.your-reusable-name %}.