@@ -10,6 +10,7 @@ type: overview
|
||||
redirect_from:
|
||||
- /actions/deployment/about-continuous-deployment
|
||||
- /actions/deployment/about-deployments/about-continuous-deployment
|
||||
- /actions/deployment/about-deployments
|
||||
topics:
|
||||
- CD
|
||||
---
|
||||
@@ -40,6 +41,7 @@ You can configure your CD workflow to run when a {% data variables.product.produ
|
||||
|
||||
## Further reading
|
||||
|
||||
* [AUTOTITLE](/actions/deployment/about-deployments/deploying-with-github-actions)
|
||||
* [AUTOTITLE](/actions/deployment/targeting-different-environments/managing-environments-for-deployment){% ifversion fpt or ghec %}
|
||||
* "[AUTOTITLE](/actions/use-cases-and-examples/deploying)"
|
||||
* "[AUTOTITLE](/actions/deployment/about-deployments/deploying-with-github-actions)"
|
||||
* "[AUTOTITLE](/actions/deployment/targeting-different-environments/managing-environments-for-deployment)"{% ifversion fpt or ghec %}
|
||||
* "[AUTOTITLE](/billing/managing-billing-for-github-actions)"{% endif %}
|
||||
|
||||
@@ -48,9 +48,7 @@ For a definition of common terms, see "[AUTOTITLE](/actions/learn-github-actions
|
||||
|
||||
Browse the complete list of CI starter workflows offered by {% data variables.product.company_short %} in the {% ifversion fpt or ghec %}[actions/starter-workflows](https://github.com/actions/starter-workflows/tree/main/ci) repository{% else %} `actions/starter-workflows` repository on {% data variables.location.product_location %}{% endif %}.
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
## Further reading
|
||||
|
||||
* "[AUTOTITLE](/billing/managing-billing-for-github-actions)"
|
||||
{% endif %}
|
||||
* "[AUTOTITLE](/actions/use-cases-and-examples/building-and-testing)"{% ifversion fpt or ghec %}
|
||||
* "[AUTOTITLE](/billing/managing-billing-for-github-actions)"{% endif %}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
---
|
||||
title: About deployments
|
||||
shortTitle: About deployments
|
||||
intro: 'Learn how deployments can run with {% data variables.product.prodname_actions %} workflows.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghec: '*'
|
||||
children:
|
||||
- /deploying-with-github-actions
|
||||
---
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
---
|
||||
title: Deploying to your cloud provider
|
||||
shortTitle: Deploy to your cloud provider
|
||||
intro: 'You can deploy to various cloud providers, such as AWS, Azure, and GKE.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '*'
|
||||
children:
|
||||
- /deploying-to-amazon-elastic-container-service
|
||||
- /deploying-to-azure
|
||||
- /deploying-to-google-kubernetes-engine
|
||||
---
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
---
|
||||
title: Deploying Xcode applications
|
||||
shortTitle: Deploy Xcode applications
|
||||
intro: 'You can sign Xcode apps within your continuous integration (CI) workflow by installing an Apple code signing certificate on {% data variables.product.prodname_actions %} runners.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghec: '*'
|
||||
children:
|
||||
- /installing-an-apple-certificate-on-macos-runners-for-xcode-development
|
||||
---
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
---
|
||||
title: Deployment
|
||||
shortTitle: Deployment
|
||||
intro: 'Automatically deploy projects with {% data variables.product.prodname_actions %}.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghec: '*'
|
||||
children:
|
||||
- /about-deployments
|
||||
- /deploying-to-your-cloud-provider
|
||||
- /deploying-xcode-applications
|
||||
---
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
---
|
||||
title: Examples
|
||||
shortTitle: Examples
|
||||
intro: 'Example workflows that demonstrate the CI/CD features of {% data variables.product.prodname_actions %}.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghec: '*'
|
||||
children:
|
||||
- using-scripts-to-test-your-code-on-a-runner
|
||||
- using-the-github-cli-on-a-runner
|
||||
- using-concurrency-expressions-and-a-test-matrix
|
||||
---
|
||||
|
||||
@@ -1,171 +0,0 @@
|
||||
---
|
||||
title: 'Using concurrency, expressions, and a test matrix'
|
||||
shortTitle: 'Use concurrency, expressions, and a test matrix'
|
||||
intro: 'How to use advanced {% data variables.product.prodname_actions %} features for continuous integration (CI).'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '>= 3.5'
|
||||
ghec: '*'
|
||||
type: how_to
|
||||
layout: inline
|
||||
topics:
|
||||
- Workflows
|
||||
---
|
||||
<!-- markdownlint-disable early-access-references -->
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
## Example overview
|
||||
|
||||
{% data reusables.actions.example-workflow-intro-ci %} When this workflow is triggered, it tests your code using a matrix of test combinations with `npm test`.
|
||||
|
||||
{% data reusables.actions.example-diagram-intro %}
|
||||
|
||||

|
||||
|
||||
## Features used in this example
|
||||
|
||||
{% data reusables.actions.example-table-intro %}
|
||||
|
||||
| **Feature** | **Implementation** |
|
||||
| --- | --- |
|
||||
{% data reusables.actions.workflow-dispatch-table-entry %}
|
||||
{% data reusables.actions.pull-request-table-entry %}
|
||||
{% data reusables.actions.cron-table-entry %}
|
||||
{% data reusables.actions.permissions-table-entry %}
|
||||
{% data reusables.actions.concurrency-table-entry %}
|
||||
| Running the job on different runners, depending on the repository | [`runs-on`](/actions/using-jobs/choosing-the-runner-for-a-job)|
|
||||
{% data reusables.actions.if-conditions-table-entry %}
|
||||
| Using a matrix to create different test configurations | [`matrix`](/actions/using-jobs/using-a-matrix-for-your-jobs)|
|
||||
{% data reusables.actions.checkout-action-table-entry %}
|
||||
{% data reusables.actions.setup-node-table-entry %}
|
||||
| Caching dependencies | [`actions/cache`](/actions/advanced-guides/caching-dependencies-to-speed-up-workflows)|
|
||||
| Running tests on the runner | `npm test`|
|
||||
|
||||
## Example workflow
|
||||
|
||||
The following workflow was created by the {% data variables.product.prodname_dotcom %} Docs Engineering team. The workflow runs tests against the code in a pull request. To review the latest version of this file in the [`github/docs`](https://github.com/github/docs) repository, see [`test.yml`](https://github.com/github/docs/blob/main/.github/workflows/test.yml).
|
||||
|
||||
```yaml annotate copy
|
||||
# {% data reusables.actions.explanation-name-key %}
|
||||
name: Node.js Tests
|
||||
|
||||
# The `on` keyword lets you define the events that trigger when the workflow is run. You can define multiple events here. For more information, see "[AUTOTITLE](/actions/using-workflows/triggering-a-workflow#using-events-to-trigger-workflows)."
|
||||
on:
|
||||
|
||||
# Add the `workflow_dispatch` event if you want to be able to manually run this workflow. For more information, see [`workflow_dispatch`](/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch).
|
||||
workflow_dispatch:
|
||||
|
||||
# Add the `pull_request` event, so that the workflow runs automatically every time a pull request is created or updated. For more information, see [`pull_request`](/actions/using-workflows/events-that-trigger-workflows#pull_request).
|
||||
pull_request:
|
||||
|
||||
# Add the `push` event with the `branch` filter, so that the workflow runs automatically every time a commit is pushed to a branch called "main". For more information, see [`push`](/actions/using-workflows/events-that-trigger-workflows#push).
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
# This modifies the default permissions granted to `GITHUB_TOKEN`. This will vary depending on the needs of your workflow. For more information, see "[AUTOTITLE](/actions/using-jobs/assigning-permissions-to-jobs)."
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
|
||||
# The `concurrency` key ensures that only a single workflow in the same concurrency group will run at the same time. For more information, see "[AUTOTITLE](/actions/using-jobs/using-concurrency)."
|
||||
# `concurrency.group` generates a concurrency group name from the workflow name and pull request information. The `||` operator is used to define fallback values.
|
||||
# `concurrency.cancel-in-progress` cancels any currently running job or workflow in the same concurrency group.
|
||||
concurrency:
|
||||
group: {% raw %}'${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'{% endraw %}
|
||||
cancel-in-progress: true
|
||||
|
||||
# This groups together all the jobs that run in the workflow file.
|
||||
jobs:
|
||||
|
||||
# This defines a job with the ID `test` that is stored within the `jobs` key.
|
||||
test:
|
||||
|
||||
# This configures the job to run on a {% data variables.product.prodname_dotcom %}-hosted runner or a self-hosted runner, depending on the repository running the workflow.
|
||||
#
|
||||
# In this example, the job will run on a self-hosted runner if the repository is named `docs-internal` and is within the `github` organization. If the repository doesn't match this path, then it will run on an `ubuntu-latest` runner hosted by {% data variables.product.prodname_dotcom %}. For more information on these options, see "[AUTOTITLE](/actions/using-jobs/choosing-the-runner-for-a-job)."
|
||||
runs-on: {% raw %}${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}{% endraw %}
|
||||
|
||||
# This sets the maximum number of minutes to let the job run before it is automatically canceled. For more information, see [`timeout-minutes`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes).
|
||||
timeout-minutes: 60
|
||||
|
||||
# This section defines the build matrix for your jobs.
|
||||
strategy:
|
||||
|
||||
# Setting `fail-fast` to `false` prevents {% data variables.product.prodname_dotcom %} from cancelling all in-progress jobs if any matrix job fails.
|
||||
fail-fast: false
|
||||
|
||||
# This creates a matrix named `test-group`, with an array of test groups. These values match the names of test groups that will be run by `npm test`.
|
||||
matrix:
|
||||
test-group:
|
||||
[
|
||||
content,
|
||||
graphql,
|
||||
meta,
|
||||
rendering,
|
||||
routing,
|
||||
unit,
|
||||
linting,
|
||||
translations,
|
||||
]
|
||||
|
||||
# This groups together all the steps that will run as part of the `test` job. Each job in a workflow has its own `steps` section.
|
||||
steps:
|
||||
|
||||
# The `uses` keyword tells the job to retrieve the action named `actions/checkout`. This is an action that checks out your repository and downloads it to the runner, allowing you to run actions against your code (such as testing tools). You must use the checkout action any time your workflow will use your repository's code. Some extra options are provided to the action using the `with` key.
|
||||
- name: Check out repo
|
||||
uses: {% data reusables.actions.action-checkout %}
|
||||
with:
|
||||
lfs: {% raw %}${{ matrix.test-group == 'content' }}{% endraw %}
|
||||
persist-credentials: 'false'
|
||||
|
||||
# This step runs a command to check out large file storage (LFS) objects from the repository.
|
||||
- name: Checkout LFS objects
|
||||
run: git lfs checkout
|
||||
|
||||
# This step uses the `trilom/file-changes-action` action to gather the files changed in the pull request, so they can be analyzed in the next step. This example is pinned to a specific version of the action, using the `a6ca26c14274c33b15e6499323aac178af06ad4b` SHA.
|
||||
- name: Gather files changed
|
||||
uses: trilom/file-changes-action@a6ca26c14274c33b15e6499323aac178af06ad4b
|
||||
id: get_diff_files
|
||||
with:
|
||||
output: ' '
|
||||
|
||||
# This step runs a shell command that uses an output from the previous step to create a file containing the list of files changed in the pull request.
|
||||
- name: Insight into changed files
|
||||
run: |
|
||||
|
||||
echo {% raw %}"${{ steps.get_diff_files.outputs.files }}" > get_diff_files.txt{% endraw %}
|
||||
|
||||
# This step uses the `actions/setup-node` action to install the specified version of the `node` software package on the runner, which gives you access to the `npm` command.
|
||||
- name: Setup node
|
||||
uses: {% data reusables.actions.action-setup-node %}
|
||||
with:
|
||||
node-version: 16.14.x
|
||||
cache: npm
|
||||
|
||||
# This step runs the `npm ci` shell command to install the npm software packages for the project.
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
# This step uses the `actions/cache` action to cache the Next.js build, so that the workflow will attempt to retrieve a cache of the build, and not rebuild it from scratch every time. For more information, see "[AUTOTITLE](/actions/using-workflows/caching-dependencies-to-speed-up-workflows)."
|
||||
- name: Cache nextjs build
|
||||
uses: {% data reusables.actions.action-cache %}
|
||||
with:
|
||||
path: .next/cache
|
||||
key: {% raw %}${{ runner.os }}-nextjs-${{ hashFiles('package*.json') }}{% endraw %}
|
||||
|
||||
# This step runs the build script.
|
||||
- name: Run build script
|
||||
run: npm run build
|
||||
|
||||
# This step runs the tests using `npm test`, and the test matrix provides a different value for {% raw %}`${{ matrix.test-group }}`{% endraw %} for each job in the matrix. It uses the `DIFF_FILE` environment variable to know which files have changed, and uses the `CHANGELOG_CACHE_FILE_PATH` environment variable for the changelog cache file.
|
||||
- name: Run tests
|
||||
env:
|
||||
DIFF_FILE: get_diff_files.txt
|
||||
CHANGELOG_CACHE_FILE_PATH: src/fixtures/fixtures/changelog-feed.json
|
||||
run: npm test -- {% raw %}tests/${{ matrix.test-group }}/{% endraw %}
|
||||
```
|
||||
|
||||
## Next steps
|
||||
|
||||
{% data reusables.actions.learning-actions %}
|
||||
@@ -1,137 +0,0 @@
|
||||
---
|
||||
title: Using scripts to test your code on a runner
|
||||
shortTitle: Use scripts to test your code on a runner
|
||||
intro: 'How to use essential {% data variables.product.prodname_actions %} features for continuous integration (CI).'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '> 3.1'
|
||||
ghec: '*'
|
||||
type: how_to
|
||||
topics:
|
||||
- Workflows
|
||||
layout: inline
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
## Example overview
|
||||
|
||||
{% data reusables.actions.example-workflow-intro-ci %} When this workflow is triggered, it automatically runs a script that checks whether the {% data variables.product.prodname_dotcom %} Docs site has any broken links.
|
||||
|
||||
{% data reusables.actions.example-diagram-intro %}
|
||||
|
||||

|
||||
|
||||
## Features used in this example
|
||||
|
||||
{% data reusables.actions.example-table-intro %}
|
||||
|
||||
| **Feature** | **Implementation** |
|
||||
| --- | --- |
|
||||
{% data reusables.actions.push-table-entry %}
|
||||
{% data reusables.actions.pull-request-table-entry %}
|
||||
{% data reusables.actions.workflow-dispatch-table-entry %}
|
||||
{% data reusables.actions.permissions-table-entry %}
|
||||
{% data reusables.actions.concurrency-table-entry %}
|
||||
| Running the job on different runners, depending on the repository | [`runs-on`](/actions/using-jobs/choosing-the-runner-for-a-job)|
|
||||
{% data reusables.actions.checkout-action-table-entry %}
|
||||
{% data reusables.actions.setup-node-table-entry %}
|
||||
| Using a third-party action | [`trilom/file-changes-action`](https://github.com/trilom/file-changes-action)|
|
||||
| Running a script on the runner | Using `./script/rendered-content-link-checker.mjs` |
|
||||
|
||||
## Example workflow
|
||||
|
||||
{% data reusables.actions.example-docs-engineering-intro %} [`check-broken-links-github-github.yml`](https://github.com/github/docs/blob/main/.github/workflows/check-broken-links-github-github.yml).
|
||||
|
||||
The following workflow renders the content of every page in the documentation and checks all internal links to ensure they connect correctly.
|
||||
|
||||
```yaml annotate copy
|
||||
# {% data reusables.actions.explanation-name-key %}
|
||||
name: 'Link Checker: All English'
|
||||
|
||||
# The `on` key lets you define the events that trigger when the workflow is run. You can define multiple events here. For more information, see "[AUTOTITLE](/actions/using-workflows/triggering-a-workflow#using-events-to-trigger-workflows)."
|
||||
on:
|
||||
# Add the `workflow_dispatch` event if you want to be able to manually run this workflow from the UI. For more information, see [`workflow_dispatch`](/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch).
|
||||
workflow_dispatch:
|
||||
# Add the `push` event, so that the workflow runs automatically every time a commit is pushed to a branch called `main`. For more information, see [`push`](/actions/using-workflows/events-that-trigger-workflows#push).
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
# Add the `pull_request` event, so that the workflow runs automatically every time a pull request is created or updated. For more information, see [`pull_request`](/actions/using-workflows/events-that-trigger-workflows#pull_request).
|
||||
pull_request:
|
||||
|
||||
# This modifies the default permissions granted to `GITHUB_TOKEN`. This will vary depending on the needs of your workflow. For more information, see "[AUTOTITLE](/actions/using-jobs/assigning-permissions-to-jobs)."
|
||||
#
|
||||
# In this example, the `pull-requests: read` permission is needed for the `trilom/file-changes-action` action that is used later in this workflow.
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
# The `concurrency` key ensures that only a single workflow in the same concurrency group will run at the same time. For more information, see "[AUTOTITLE](/actions/using-jobs/using-concurrency)."
|
||||
# `concurrency.group` generates a concurrency group name from the workflow name and pull request information. The `||` operator is used to define fallback values.
|
||||
# `concurrency.cancel-in-progress` cancels any currently running job or workflow in the same concurrency group.
|
||||
concurrency:
|
||||
group: {% raw %}'${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'{% endraw %}
|
||||
cancel-in-progress: true
|
||||
|
||||
# The `jobs` key groups together all the jobs that run in the workflow file.
|
||||
jobs:
|
||||
# This line defines a job with the ID `check-links` that is stored within the `jobs` key.
|
||||
check-links:
|
||||
# The `runs-on` key in this example configures the job to run on a {% data variables.product.prodname_dotcom %}-hosted runner or a self-hosted runner, depending on the repository running the workflow.
|
||||
#
|
||||
# In this example, the job will run on a self-hosted runner if the repository is named `docs-internal` and is within the `github` organization. If the repository doesn't match this path, then it will run on an `ubuntu-latest` runner hosted by {% data variables.product.prodname_dotcom %}. For more information on these options, see "[AUTOTITLE](/actions/using-jobs/choosing-the-runner-for-a-job)."
|
||||
runs-on: {% raw %}${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}{% endraw %}
|
||||
# The `steps` key groups together all the steps that will run as part of the `check-links` job. Each job in a workflow has its own `steps` section.
|
||||
steps:
|
||||
# The `uses` key tells the job to retrieve the action named `actions/checkout`. This is an action that checks out your repository and downloads it to the runner, allowing you to run actions against your code (such as testing tools). You must use the checkout action any time your workflow will use the repository's code or you are using an action defined in the repository.
|
||||
- name: Checkout
|
||||
uses: {% data reusables.actions.action-checkout %}
|
||||
|
||||
# This step uses the `actions/setup-node` action to install the specified version of the Node.js software package on the runner, which gives you access to the `npm` command.
|
||||
- name: Setup node
|
||||
uses: {% data reusables.actions.action-setup-node %}
|
||||
with:
|
||||
node-version: 16.13.x
|
||||
cache: npm
|
||||
|
||||
# The `run` key tells the job to execute a command on the runner. In this example, `npm ci` is used to install the npm software packages for the project.
|
||||
- name: Install
|
||||
run: npm ci
|
||||
|
||||
# This step uses the `trilom/file-changes-action` action to gather all the changed files. This example is pinned to a specific version of the action, using the `a6ca26c14274c33b15e6499323aac178af06ad4b` SHA.
|
||||
#
|
||||
# In this example, this step creates the file "{% raw %}${{ env.HOME }}/files.json{% endraw %}", among others.
|
||||
- name: Gather files changed
|
||||
uses: trilom/file-changes-action@a6ca26c14274c33b15e6499323aac178af06ad4b
|
||||
with:
|
||||
fileOutput: 'json'
|
||||
|
||||
# To help with verification, this step lists the contents of `files.json`. This will be visible in the workflow run's log, and can be useful for debugging.
|
||||
- name: Show files changed
|
||||
run: cat $HOME/files.json
|
||||
|
||||
# This step uses the `run` command to execute a script that is stored in the repository at `script/rendered-content-link-checker.mjs` and passes all the parameters it needs to run.
|
||||
- name: Link check (warnings, changed files)
|
||||
run: |
|
||||
./script/rendered-content-link-checker.mjs \
|
||||
--language en \
|
||||
--max 100 \
|
||||
--check-anchors \
|
||||
--check-images \
|
||||
--verbose \
|
||||
--list $HOME/files.json
|
||||
|
||||
# This step also uses `run` command to execute a script that is stored in the repository at `script/rendered-content-link-checker.mjs` and passes a different set of parameters.
|
||||
- name: Link check (critical, all files)
|
||||
run: |
|
||||
./script/rendered-content-link-checker.mjs \
|
||||
--language en \
|
||||
--exit \
|
||||
--verbose \
|
||||
--check-images \
|
||||
--level critical
|
||||
```
|
||||
|
||||
## Next steps
|
||||
|
||||
{% data reusables.actions.learning-actions %}
|
||||
@@ -1,180 +0,0 @@
|
||||
---
|
||||
title: Using the GitHub CLI on a runner
|
||||
shortTitle: Use the GitHub CLI on a runner
|
||||
intro: 'How to use advanced {% data variables.product.prodname_actions %} features for continuous integration (CI).'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '> 3.1'
|
||||
ghec: '*'
|
||||
type: how_to
|
||||
topics:
|
||||
- Workflows
|
||||
layout: inline
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
## Example overview
|
||||
|
||||
{% data reusables.actions.example-workflow-intro-ci %} When this workflow is triggered, it automatically runs a script that checks whether the {% data variables.product.prodname_dotcom %} Docs site has any broken links. If any broken links are found, the workflow uses the {% data variables.product.prodname_dotcom %} CLI to create a {% data variables.product.prodname_dotcom %} issue with the details.
|
||||
|
||||
{% data reusables.actions.example-diagram-intro %}
|
||||
|
||||

|
||||
|
||||
## Features used in this example
|
||||
|
||||
{% data reusables.actions.example-table-intro %}
|
||||
|
||||
| **Feature** | **Implementation** |
|
||||
| --- | --- |
|
||||
{% data reusables.actions.cron-table-entry %}
|
||||
{% data reusables.actions.permissions-table-entry %}
|
||||
{% data reusables.actions.if-conditions-table-entry %}
|
||||
{% data reusables.actions.secrets-table-entry %}
|
||||
{% data reusables.actions.checkout-action-table-entry %}
|
||||
{% data reusables.actions.setup-node-table-entry %}
|
||||
| Using a third-party action | [`peter-evans/create-issue-from-file`](https://github.com/peter-evans/create-issue-from-file)|
|
||||
| Running shell commands on the runner | [`run`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun) |
|
||||
| Running a script on the runner | Using `script/check-english-links.js` |
|
||||
| Generating an output file | Piping the output using the `>` operator |
|
||||
| Checking for existing issues using {% data variables.product.prodname_cli %} | [`gh issue list`](https://cli.github.com/manual/gh_issue_list) |
|
||||
| Commenting on an issue using {% data variables.product.prodname_cli %} | [`gh issue comment`](https://cli.github.com/manual/gh_issue_comment) |
|
||||
|
||||
## Example workflow
|
||||
|
||||
{% data reusables.actions.example-docs-engineering-intro %} [`check-all-english-links.yml`](https://github.com/github/docs/blob/6e01c0653836c10d7e092a17566a2c88b10504ce/.github/workflows/check-all-english-links.yml).
|
||||
|
||||
The following workflow checks all English links one time per day and reports broken links by creating a new issue for the docs content team to review.
|
||||
|
||||
```yaml annotate copy
|
||||
# {% data reusables.actions.explanation-name-key %}
|
||||
name: Check all English links
|
||||
|
||||
# Defines the `workflow_dispatch` and `scheduled` as triggers for the workflow.
|
||||
#
|
||||
# The `workflow_dispatch` event lets you manually run this workflow from the UI. For more information, see [`workflow_dispatch`](/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch).
|
||||
#
|
||||
# The `schedule` event lets you use `cron` syntax to define a regular interval for automatically triggering the workflow. For more information, see [`schedule`](/actions/using-workflows/events-that-trigger-workflows#schedule).
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '40 19 * * *' # once a day at 19:40 UTC / 11:40 PST
|
||||
|
||||
# Modifies the default permissions granted to `GITHUB_TOKEN`. This will vary depending on the needs of your workflow. For more information, see "[AUTOTITLE](/actions/using-jobs/assigning-permissions-to-jobs)."
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
|
||||
# Groups together all the jobs that run in the workflow file.
|
||||
jobs:
|
||||
# Defines a job with the ID `check_all_english_links`, and the name `Check all links`, that is stored within the `jobs` key.
|
||||
check_all_english_links:
|
||||
name: Check all links
|
||||
# Only run the `check_all_english_links` job if the repository is named `docs-internal` and is within the `github` organization. Otherwise, the job is marked as _skipped_.
|
||||
if: github.repository == 'github/docs-internal'
|
||||
# Configures the job to run on an Ubuntu Linux runner. This means that the job will execute on a fresh virtual machine hosted by {% data variables.product.prodname_dotcom %}. For syntax examples using other runners, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on)."
|
||||
runs-on: ubuntu-latest
|
||||
# Creates custom environment variables, and redefines the built-in `GITHUB_TOKEN` variable to use a custom [secret](/actions/security-guides/using-secrets-in-github-actions). These variables will be referenced later in the workflow.
|
||||
env:
|
||||
GITHUB_TOKEN: {% raw %}${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}{% endraw %}
|
||||
FIRST_RESPONDER_PROJECT: Docs content first responder
|
||||
REPORT_AUTHOR: docubot
|
||||
REPORT_LABEL: broken link report
|
||||
REPORT_REPOSITORY: github/docs-content
|
||||
# Groups together all the steps that will run as part of the `check_all_english_links` job. Each job in the workflow has its own `steps` section.
|
||||
steps:
|
||||
# The `uses` keyword tells the job to retrieve the action named `actions/checkout`. This is an action that checks out your repository and downloads it to the runner, allowing you to run actions against your code (such as testing tools). You must use the checkout action any time your workflow will run against the repository's code or you are using an action defined in the repository.
|
||||
- name: Check out repo's default branch
|
||||
uses: {% data reusables.actions.action-checkout %}
|
||||
# This step uses the `actions/setup-node` action to install the specified version of the `node` software package on the runner, which gives you access to the `npm` command.
|
||||
- name: Setup Node
|
||||
uses: {% data reusables.actions.action-setup-node %}
|
||||
with:
|
||||
node-version: 16.13.x
|
||||
cache: npm
|
||||
# The `run` keyword tells the job to execute a command on the runner. In this case, the `npm ci` and `npm run build` commands are run as separate steps to install and build the Node.js application in the repository.
|
||||
- name: Run the "npm ci" command
|
||||
run: npm ci
|
||||
- name: Run the "npm run build" command
|
||||
run: npm run build
|
||||
# This `run` command executes a script that is stored in the repository at `script/check-english-links.js`, and pipes the output to a file called `broken_links.md`.
|
||||
- name: Run script
|
||||
run: |
|
||||
script/check-english-links.js > broken_links.md
|
||||
|
||||
# If the `check-english-links.js` script detects broken links and returns a non-zero (failure) exit status, then use a [workflow command](/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter) to set an output that has the value of the first line of the `broken_links.md` file (this is used the next step).
|
||||
#
|
||||
# `check-english-links.js` returns 0 if no links are broken, and 1 if any links are broken. When an Actions step's exit code is 1, the action run's job status is failure and the run ends.
|
||||
#
|
||||
# The following steps create an issue for the broken link report only if any links are broken, so {% raw %}`if: ${{ failure() }}`{% endraw %} ensures the steps run despite the previous step's failure of the job.
|
||||
- if: {% raw %}${{ failure() }}{% endraw %}
|
||||
name: Get title for issue
|
||||
id: check
|
||||
run: echo "title=$(head -1 broken_links.md)" >> $GITHUB_OUTPUT
|
||||
# Uses the `peter-evans/create-issue-from-file` action to create a new {% data variables.product.prodname_dotcom %} issue. This example is pinned to a specific version of the action, using the `ceef9be92406ace67ab5421f66570acf213ec395` SHA.
|
||||
- if: {% raw %}${{ failure() }}{% endraw %}
|
||||
name: Create issue from file
|
||||
id: broken-link-report
|
||||
uses: peter-evans/create-issue-from-file@ceef9be92406ace67ab5421f66570acf213ec395
|
||||
with:
|
||||
token: {% raw %}${{ env.GITHUB_TOKEN }}{% endraw %}
|
||||
|
||||
title: {% raw %}${{ steps.check.outputs.title }}{% endraw %}
|
||||
content-filepath: ./broken_links.md
|
||||
repository: {% raw %}${{ env.REPORT_REPOSITORY }}{% endraw %}
|
||||
labels: {% raw %}${{ env.REPORT_LABEL }}{% endraw %}
|
||||
# Uses [`gh issue list`](https://cli.github.com/manual/gh_issue_list) to locate the previously created issue from earlier runs. This is [aliased](https://cli.github.com/manual/gh_alias_set) to `gh list-reports` for simpler processing in later steps.
|
||||
- if: {% raw %}${{ failure() }}{% endraw %}
|
||||
name: Close and/or comment on old issues
|
||||
env:
|
||||
{% raw %}NEW_REPORT_URL: 'https://github.com/${{ env.REPORT_REPOSITORY }}/issues/${{ steps.broken-link-report.outputs.issue-number }}'{% endraw %}
|
||||
run: |
|
||||
gh alias set list-reports "issue list \
|
||||
--repo {% raw %}${{ env.REPORT_REPOSITORY }} \{% endraw %}
|
||||
--author {% raw %}${{ env.REPORT_AUTHOR }} \{% endraw %}
|
||||
--label {% raw %}'${{ env.REPORT_LABEL }}'"{% endraw %}
|
||||
|
||||
|
||||
|
||||
previous_report_url=$(gh list-reports \
|
||||
--state all \
|
||||
--limit 2 \
|
||||
--json url \
|
||||
--jq '.[].url' \
|
||||
| grep -v {% raw %}${{ env.NEW_REPORT_URL }}{% endraw %} | head -1)
|
||||
|
||||
# [`gh issue comment`](https://cli.github.com/manual/gh_issue_comment) is used to add a comment to the new issue that links to the previous one.
|
||||
gh issue comment {% raw %}${{ env.NEW_REPORT_URL }}{% endraw %} --body "⬅️ [Previous report]($previous_report_url)"
|
||||
|
||||
# If an issue from a previous run is open and assigned to someone, then use [`gh issue comment`](https://cli.github.com/manual/gh_issue_comment) to add a comment with a link to the new issue without closing the old report. To get the issue URL, the `jq` expression processes the resulting JSON output.
|
||||
#
|
||||
# If an issue from a previous run is open and is not assigned to anyone, use [`gh issue comment`](https://cli.github.com/manual/gh_issue_comment) to add a comment with a link to the new issue. Then use [`gh issue close`](https://cli.github.com/manual/gh_issue_close) and [`gh issue edit`](https://cli.github.com/manual/gh_issue_edit) to close the issue and remove it from the project board.
|
||||
|
||||
for issue_url in $(gh list-reports \
|
||||
--json assignees,url \
|
||||
--jq '.[] | select (.assignees != []) | .url'); do
|
||||
if [ "$issue_url" != {% raw %}"${{ env.NEW_REPORT_URL }}"{% endraw %} ]; then
|
||||
gh issue comment $issue_url --body "➡️ [Newer report]({% raw %}${{ env.NEW_REPORT_URL }}{% endraw %})"
|
||||
fi
|
||||
done
|
||||
|
||||
for issue_url in $(gh list-reports \
|
||||
--search 'no:assignee' \
|
||||
--json url \
|
||||
--jq '.[].url'); do
|
||||
if [ "$issue_url" != {% raw %}"${{ env.NEW_REPORT_URL }}"{% endraw %} ]; then
|
||||
gh issue comment $issue_url --body "➡️ [Newer report]({% raw %}${{ env.NEW_REPORT_URL }})"{% endraw %}
|
||||
|
||||
# Use [`gh issue close`](https://cli.github.com/manual/gh_issue_close) to close the old issue.
|
||||
gh issue close $issue_url
|
||||
|
||||
# Use [`gh issue edit`](https://cli.github.com/manual/gh_issue_edit) to edit the old issue and remove it from a specific {% data variables.product.prodname_dotcom %} project board.
|
||||
gh issue edit $issue_url --remove-project "{% raw %}${{ env.FIRST_RESPONDER_PROJECT }}"{% endraw %}
|
||||
fi
|
||||
done
|
||||
```
|
||||
|
||||
## Next steps
|
||||
|
||||
{% data reusables.actions.learning-actions %}
|
||||
@@ -18,29 +18,29 @@ includeGuides:
|
||||
- /actions/about-github-actions/understanding-github-actions
|
||||
- /actions/creating-actions/creating-a-docker-container-action
|
||||
- /actions/writing-workflows/using-starter-workflows
|
||||
- /actions/automating-builds-and-tests/building-and-testing-python
|
||||
- /actions/automating-builds-and-tests/building-and-testing-nodejs
|
||||
- /actions/publishing-packages/about-packaging-with-github-actions
|
||||
- /actions/publishing-packages/publishing-docker-images
|
||||
- /actions/use-cases-and-examples/building-and-testing/building-and-testing-python
|
||||
- /actions/use-cases-and-examples/building-and-testing/building-and-testing-nodejs
|
||||
- /actions/use-cases-and-examples/publishing-packages/about-packaging-with-github-actions
|
||||
- /actions/use-cases-and-examples/publishing-packages/publishing-docker-images
|
||||
- /actions/writing-workflows/choosing-what-your-workflow-does/caching-dependencies-to-speed-up-workflows
|
||||
- /actions/about-github-actions/about-continuous-integration
|
||||
- /actions/automating-builds-and-tests/building-and-testing-powershell
|
||||
- /actions/automating-builds-and-tests/building-and-testing-ruby
|
||||
- /actions/automating-builds-and-tests/building-and-testing-java-with-maven
|
||||
- /actions/automating-builds-and-tests/building-and-testing-java-with-gradle
|
||||
- /actions/automating-builds-and-tests/building-and-testing-java-with-ant
|
||||
- /actions/automating-builds-and-tests/building-and-testing-swift
|
||||
- /actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
|
||||
- /actions/automating-builds-and-tests/building-and-testing-xamarin-applications
|
||||
- /actions/publishing-packages/publishing-nodejs-packages
|
||||
- /actions/publishing-packages/publishing-java-packages-with-maven
|
||||
- /actions/publishing-packages/publishing-java-packages-with-gradle
|
||||
- /actions/use-cases-and-examples/building-and-testing/building-and-testing-powershell
|
||||
- /actions/use-cases-and-examples/building-and-testing/building-and-testing-ruby
|
||||
- /actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-maven
|
||||
- /actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-gradle
|
||||
- /actions/use-cases-and-examples/building-and-testing/building-and-testing-java-with-ant
|
||||
- /actions/use-cases-and-examples/building-and-testing/building-and-testing-swift
|
||||
- /actions/use-cases-and-examples/deploying/installing-an-apple-certificate-on-macos-runners-for-xcode-development
|
||||
- /actions/use-cases-and-examples/building-and-testing/building-and-testing-xamarin-applications
|
||||
- /actions/use-cases-and-examples/publishing-packages/publishing-nodejs-packages
|
||||
- /actions/use-cases-and-examples/publishing-packages/publishing-java-packages-with-maven
|
||||
- /actions/use-cases-and-examples/publishing-packages/publishing-java-packages-with-gradle
|
||||
- /actions/writing-workflows/choosing-what-your-workflow-does/storing-workflow-data-as-artifacts
|
||||
- /actions/using-containerized-services/about-service-containers
|
||||
- /actions/using-containerized-services/creating-redis-service-containers
|
||||
- /actions/using-containerized-services/creating-postgresql-service-containers
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-amazon-elastic-container-service
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-google-kubernetes-engine
|
||||
- /actions/use-cases-and-examples/using-containerized-services/about-service-containers
|
||||
- /actions/use-cases-and-examples/using-containerized-services/creating-redis-service-containers
|
||||
- /actions/use-cases-and-examples/using-containerized-services/creating-postgresql-service-containers
|
||||
- /actions/use-cases-and-examples/deploying/deploying-to-amazon-elastic-container-service
|
||||
- /actions/use-cases-and-examples/deploying/deploying-to-google-kubernetes-engine
|
||||
- /actions/creating-actions/about-custom-actions
|
||||
- /actions/creating-actions/creating-a-javascript-action
|
||||
- /actions/creating-actions/creating-a-composite-action
|
||||
@@ -49,22 +49,22 @@ includeGuides:
|
||||
- /actions/migrating-to-github-actions/manually-migrating-to-github-actions/migrating-from-gitlab-cicd-to-github-actions
|
||||
- /actions/migrating-to-github-actions/manually-migrating-to-github-actions/migrating-from-jenkins-to-github-actions
|
||||
- /actions/migrating-to-github-actions/manually-migrating-to-github-actions/migrating-from-travis-ci-to-github-actions
|
||||
- /actions/managing-issues-and-pull-requests/using-github-actions-for-project-management
|
||||
- /actions/managing-issues-and-pull-requests/closing-inactive-issues
|
||||
- /actions/managing-issues-and-pull-requests/scheduling-issue-creation
|
||||
- /actions/managing-issues-and-pull-requests/adding-labels-to-issues
|
||||
- /actions/managing-issues-and-pull-requests/commenting-on-an-issue-when-a-label-is-added
|
||||
- /actions/managing-issues-and-pull-requests/moving-assigned-issues-on-project-boards
|
||||
- /actions/managing-issues-and-pull-requests/removing-a-label-when-a-card-is-added-to-a-project-board-column
|
||||
- /actions/use-cases-and-examples/project-management/using-github-actions-for-project-management
|
||||
- /actions/use-cases-and-examples/project-management/closing-inactive-issues
|
||||
- /actions/use-cases-and-examples/project-management/scheduling-issue-creation
|
||||
- /actions/use-cases-and-examples/project-management/adding-labels-to-issues
|
||||
- /actions/use-cases-and-examples/project-management/commenting-on-an-issue-when-a-label-is-added
|
||||
- /actions/use-cases-and-examples/project-management/moving-assigned-issues-on-project-boards
|
||||
- /actions/use-cases-and-examples/project-management/removing-a-label-when-a-card-is-added-to-a-project-board-column
|
||||
- /code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions
|
||||
- /code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-docker-to-azure-app-service
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-java-to-azure-app-service
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-net-to-azure-app-service
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-nodejs-to-azure-app-service
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-php-to-azure-app-service
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-python-to-azure-app-service
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-to-azure-static-web-app
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-to-azure-kubernetes-service
|
||||
- /actions/use-cases-and-examples/deploying/deploying-docker-to-azure-app-service
|
||||
- /actions/use-cases-and-examples/deploying/deploying-java-to-azure-app-service
|
||||
- /actions/use-cases-and-examples/deploying/deploying-net-to-azure-app-service
|
||||
- /actions/use-cases-and-examples/deploying/deploying-nodejs-to-azure-app-service
|
||||
- /actions/use-cases-and-examples/deploying/deploying-php-to-azure-app-service
|
||||
- /actions/use-cases-and-examples/deploying/deploying-python-to-azure-app-service
|
||||
- /actions/use-cases-and-examples/deploying/deploying-to-azure-static-web-app
|
||||
- /actions/use-cases-and-examples/deploying/deploying-to-azure-kubernetes-service
|
||||
---
|
||||
|
||||
|
||||
@@ -8,19 +8,19 @@ introLinks:
|
||||
featuredLinks:
|
||||
startHere:
|
||||
- /actions/writing-workflows
|
||||
- /actions/examples
|
||||
- /actions/use-cases-and-examples
|
||||
- /actions/about-github-actions/about-continuous-integration
|
||||
- /actions/deployment/about-deployments/deploying-with-github-actions
|
||||
- /actions/publishing-packages/about-packaging-with-github-actions
|
||||
- /actions/use-cases-and-examples/deploying/deploying-with-github-actions
|
||||
- /actions/use-cases-and-examples/publishing-packages/about-packaging-with-github-actions
|
||||
- /actions/monitoring-and-troubleshooting-workflows
|
||||
guideCards:
|
||||
- /actions/writing-workflows/using-starter-workflows
|
||||
- /actions/publishing-packages/publishing-nodejs-packages
|
||||
- /actions/automating-builds-and-tests/building-and-testing-powershell
|
||||
- /actions/use-cases-and-examples/publishing-packages/publishing-nodejs-packages
|
||||
- /actions/use-cases-and-examples/building-and-testing/building-and-testing-powershell
|
||||
popular:
|
||||
- /actions/writing-workflows/workflow-syntax-for-github-actions
|
||||
- /actions/writing-workflows
|
||||
- /actions/examples
|
||||
- /actions/use-cases-and-examples
|
||||
changelog:
|
||||
label: actions
|
||||
redirect_from:
|
||||
@@ -38,20 +38,15 @@ versions:
|
||||
ghec: '*'
|
||||
children:
|
||||
- /about-github-actions
|
||||
- /examples
|
||||
- /writing-workflows
|
||||
- /using-workflows
|
||||
- /managing-workflow-runs-and-deployments
|
||||
- /automating-builds-and-tests
|
||||
- /deployment
|
||||
- /using-containerized-services
|
||||
- /publishing-packages
|
||||
- /managing-issues-and-pull-requests
|
||||
- /migrating-to-github-actions
|
||||
- /monitoring-and-troubleshooting-workflows
|
||||
- /using-github-hosted-runners
|
||||
- /hosting-your-own-runners
|
||||
- /security-for-github-actions
|
||||
- /use-cases-and-examples
|
||||
- /creating-actions
|
||||
- /administering-github-actions
|
||||
- /guides
|
||||
|
||||
@@ -9,6 +9,8 @@ type: tutorial
|
||||
topics:
|
||||
- CI
|
||||
shortTitle: Build & test Go
|
||||
redirect_from:
|
||||
- /actions/automating-builds-and-tests/building-and-testing-go
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
@@ -4,6 +4,7 @@ intro: You can create a continuous integration (CI) workflow in GitHub Actions t
|
||||
redirect_from:
|
||||
- /actions/language-and-framework-guides/building-and-testing-java-with-ant
|
||||
- /actions/guides/building-and-testing-java-with-ant
|
||||
- /actions/automating-builds-and-tests/building-and-testing-java-with-ant
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -4,6 +4,7 @@ intro: You can create a continuous integration (CI) workflow in GitHub Actions t
|
||||
redirect_from:
|
||||
- /actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
- /actions/guides/building-and-testing-java-with-gradle
|
||||
- /actions/automating-builds-and-tests/building-and-testing-java-with-gradle
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -4,6 +4,7 @@ intro: You can create a continuous integration (CI) workflow in GitHub Actions t
|
||||
redirect_from:
|
||||
- /actions/language-and-framework-guides/building-and-testing-java-with-maven
|
||||
- /actions/guides/building-and-testing-java-with-maven
|
||||
- /actions/automating-builds-and-tests/building-and-testing-java-with-maven
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -3,6 +3,7 @@ title: Building and testing .NET
|
||||
intro: You can create a continuous integration (CI) workflow to build and test your .NET project.
|
||||
redirect_from:
|
||||
- /actions/guides/building-and-testing-net
|
||||
- /actions/automating-builds-and-tests/building-and-testing-net
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -5,6 +5,7 @@ redirect_from:
|
||||
- /actions/automating-your-workflow-with-github-actions/using-nodejs-with-github-actions
|
||||
- /actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
- /actions/guides/building-and-testing-nodejs
|
||||
- /actions/automating-builds-and-tests/building-and-testing-nodejs
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -3,6 +3,7 @@ title: Building and testing PowerShell
|
||||
intro: You can create a continuous integration (CI) workflow to build and test your PowerShell project.
|
||||
redirect_from:
|
||||
- /actions/guides/building-and-testing-powershell
|
||||
- /actions/automating-builds-and-tests/building-and-testing-powershell
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -5,6 +5,7 @@ redirect_from:
|
||||
- /actions/automating-your-workflow-with-github-actions/using-python-with-github-actions
|
||||
- /actions/language-and-framework-guides/using-python-with-github-actions
|
||||
- /actions/guides/building-and-testing-python
|
||||
- /actions/automating-builds-and-tests/building-and-testing-python
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -3,6 +3,7 @@ title: Building and testing Ruby
|
||||
intro: You can create a continuous integration (CI) workflow to build and test your Ruby project.
|
||||
redirect_from:
|
||||
- /actions/guides/building-and-testing-ruby
|
||||
- /actions/automating-builds-and-tests/building-and-testing-ruby
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -3,6 +3,7 @@ title: Building and testing Swift
|
||||
intro: You can create a continuous integration (CI) workflow to build and test your Swift project.
|
||||
redirect_from:
|
||||
- /actions/guides/building-and-testing-swift
|
||||
- /actions/automating-builds-and-tests/building-and-testing-swift
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -3,6 +3,7 @@ title: Building and testing Xamarin applications
|
||||
intro: You can create a continuous integration (CI) workflow in GitHub Actions to build and test your Xamarin application.
|
||||
redirect_from:
|
||||
- /actions/guides/building-and-testing-xamarin-applications
|
||||
- /actions/automating-builds-and-tests/building-and-testing-xamarin-applications
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Automating builds and tests
|
||||
title: Building and testing
|
||||
shortTitle: Build and test
|
||||
intro: 'You can automatically build and test your projects with {% data variables.product.prodname_actions %}.'
|
||||
versions:
|
||||
@@ -15,6 +15,8 @@ redirect_from:
|
||||
- /actions/language-and-framework-guides/github-actions-for-python
|
||||
- /actions/guides/building-and-testing-nodejs-or-python
|
||||
- /actions/automating-builds-and-tests/building-and-testing-nodejs-or-python
|
||||
- /actions/automating-builds-and-tests
|
||||
- /actions/examples/using-scripts-to-test-your-code-on-a-runner
|
||||
children:
|
||||
- /building-and-testing-go
|
||||
- /building-and-testing-java-with-ant
|
||||
@@ -11,6 +11,8 @@ topics:
|
||||
- Containers
|
||||
- Docker
|
||||
- Azure App Service
|
||||
redirect_from:
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-docker-to-azure-app-service
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
@@ -10,6 +10,8 @@ topics:
|
||||
- CD
|
||||
- Java
|
||||
- Azure App Service
|
||||
redirect_from:
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-java-to-azure-app-service
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
@@ -9,6 +9,8 @@ type: tutorial
|
||||
topics:
|
||||
- CD
|
||||
- Azure App Service
|
||||
redirect_from:
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-net-to-azure-app-service
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
@@ -5,6 +5,7 @@ redirect_from:
|
||||
- /actions/guides/deploying-to-azure-app-service
|
||||
- /actions/deployment/deploying-to-azure-app-service
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure-app-service
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-nodejs-to-azure-app-service
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -9,6 +9,8 @@ type: tutorial
|
||||
topics:
|
||||
- CD
|
||||
- Azure App Service
|
||||
redirect_from:
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-php-to-azure-app-service
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
@@ -10,6 +10,8 @@ topics:
|
||||
- CD
|
||||
- Python
|
||||
- Azure App Service
|
||||
redirect_from:
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-python-to-azure-app-service
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
@@ -4,6 +4,7 @@ intro: You can deploy to Amazon Elastic Container Service (ECS) as part of your
|
||||
redirect_from:
|
||||
- /actions/guides/deploying-to-amazon-elastic-container-service
|
||||
- /actions/deployment/deploying-to-amazon-elastic-container-service
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-amazon-elastic-container-service
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -9,6 +9,8 @@ type: tutorial
|
||||
topics:
|
||||
- CD
|
||||
- Azure Kubernetes Service
|
||||
redirect_from:
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-to-azure-kubernetes-service
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
@@ -9,6 +9,8 @@ type: tutorial
|
||||
topics:
|
||||
- CD
|
||||
- Azure Static Web Apps
|
||||
redirect_from:
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure/deploying-to-azure-static-web-app
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
@@ -4,6 +4,7 @@ intro: You can deploy to Google Kubernetes Engine as part of your continuous dep
|
||||
redirect_from:
|
||||
- /actions/guides/deploying-to-google-kubernetes-engine
|
||||
- /actions/deployment/deploying-to-google-kubernetes-engine
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-google-kubernetes-engine
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -8,6 +8,7 @@ versions:
|
||||
type: overview
|
||||
redirect_from:
|
||||
- /actions/deployment/deploying-with-github-actions
|
||||
- /actions/deployment/about-deployments/deploying-with-github-actions
|
||||
topics:
|
||||
- CD
|
||||
- Deployment
|
||||
@@ -1,12 +1,13 @@
|
||||
---
|
||||
title: Deploying to Azure
|
||||
shortTitle: Deploy to Azure
|
||||
intro: 'Learn how to deploy to Azure App Service, Azure Kubernetes, and Azure Static Web App as part of your continuous deployment (CD) workflows.'
|
||||
title: Deploying
|
||||
shortTitle: Deployment
|
||||
intro: 'Automatically deploy projects with {% data variables.product.prodname_actions %}.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghec: '*'
|
||||
children:
|
||||
- /deploying-with-github-actions
|
||||
- /deploying-nodejs-to-azure-app-service
|
||||
- /deploying-python-to-azure-app-service
|
||||
- /deploying-java-to-azure-app-service
|
||||
@@ -15,5 +16,8 @@ children:
|
||||
- /deploying-docker-to-azure-app-service
|
||||
- /deploying-to-azure-static-web-app
|
||||
- /deploying-to-azure-kubernetes-service
|
||||
- /deploying-to-amazon-elastic-container-service
|
||||
- /deploying-to-google-kubernetes-engine
|
||||
- /installing-an-apple-certificate-on-macos-runners-for-xcode-development
|
||||
---
|
||||
|
||||
@@ -5,6 +5,8 @@ intro: 'You can sign Xcode apps within your continuous integration (CI) workflow
|
||||
redirect_from:
|
||||
- /actions/guides/installing-an-apple-certificate-on-macos-runners-for-xcode-development
|
||||
- /actions/deployment/installing-an-apple-certificate-on-macos-runners-for-xcode-development
|
||||
- /actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
|
||||
- /actions/deployment/deploying-xcode-applications
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
21
content/actions/use-cases-and-examples/index.md
Normal file
21
content/actions/use-cases-and-examples/index.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: Use cases and examples
|
||||
shortTitle: Use cases and examples
|
||||
intro: 'Example workflows that demonstrate the features of {% data variables.product.prodname_actions %}.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghec: '*'
|
||||
redirect_from:
|
||||
- /actions/examples
|
||||
- /actions/deployment
|
||||
- /actions/deployment/deploying-to-your-cloud-provider
|
||||
- /actions/deployment/deploying-to-your-cloud-provider/deploying-to-azure
|
||||
children:
|
||||
- building-and-testing
|
||||
- deploying
|
||||
- publishing-packages
|
||||
- project-management
|
||||
- using-containerized-services
|
||||
---
|
||||
|
||||
@@ -4,6 +4,7 @@ shortTitle: Add labels to issues
|
||||
intro: 'You can use {% data variables.product.prodname_actions %} to automatically label issues.'
|
||||
redirect_from:
|
||||
- /actions/guides/adding-labels-to-issues
|
||||
- /actions/managing-issues-and-pull-requests/adding-labels-to-issues
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -4,6 +4,7 @@ shortTitle: Close inactive issues
|
||||
intro: 'You can use {% data variables.product.prodname_actions %} to comment on or close issues that have been inactive for a certain period of time.'
|
||||
redirect_from:
|
||||
- /actions/guides/closing-inactive-issues
|
||||
- /actions/managing-issues-and-pull-requests/closing-inactive-issues
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -3,6 +3,7 @@ title: Commenting on an issue when a label is added
|
||||
intro: 'You can use {% data variables.product.prodname_actions %} to automatically comment on issues when a specific label is applied.'
|
||||
redirect_from:
|
||||
- /actions/guides/commenting-on-an-issue-when-a-label-is-added
|
||||
- /actions/managing-issues-and-pull-requests/commenting-on-an-issue-when-a-label-is-added
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Managing issues and pull requests
|
||||
shortTitle: Manage issues and pull requests
|
||||
title: Managing projects
|
||||
shortTitle: Project management
|
||||
intro: 'You can automatically manage your issues and pull requests using {% data variables.product.prodname_actions %} workflows.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -14,5 +14,7 @@ children:
|
||||
- /moving-assigned-issues-on-project-boards
|
||||
- /removing-a-label-when-a-card-is-added-to-a-project-board-column
|
||||
- /scheduling-issue-creation
|
||||
redirect_from:
|
||||
- /actions/managing-issues-and-pull-requests
|
||||
---
|
||||
|
||||
@@ -3,6 +3,7 @@ title: 'Moving assigned issues on {% data variables.projects.projects_v1_boards
|
||||
intro: 'You can use {% data variables.product.prodname_actions %} to automatically move an issue to a specific column on a {% data variables.projects.projects_v1_board %} when the issue is assigned.'
|
||||
redirect_from:
|
||||
- /actions/guides/moving-assigned-issues-on-project-boards
|
||||
- /actions/managing-issues-and-pull-requests/moving-assigned-issues-on-project-boards
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -3,6 +3,7 @@ title: 'Removing a label when a card is added to a {% data variables.projects.pr
|
||||
intro: 'You can use {% data variables.product.prodname_actions %} to automatically remove a label when an issue or pull request is added to a specific column on a {% data variables.projects.projects_v1_board %}.'
|
||||
redirect_from:
|
||||
- /actions/guides/removing-a-label-when-a-card-is-added-to-a-project-board-column
|
||||
- /actions/managing-issues-and-pull-requests/removing-a-label-when-a-card-is-added-to-a-project-board-column
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -4,6 +4,7 @@ shortTitle: Schedule issue creation
|
||||
intro: 'You can use {% data variables.product.prodname_actions %} to create an issue on a regular basis for things like daily meetings or quarterly reviews.'
|
||||
redirect_from:
|
||||
- /actions/guides/scheduling-issue-creation
|
||||
- /actions/managing-issues-and-pull-requests/scheduling-issue-creation
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -3,6 +3,7 @@ title: Using GitHub Actions for project management
|
||||
intro: 'You can use {% data variables.product.prodname_actions %} to automate many of your project management tasks.'
|
||||
redirect_from:
|
||||
- /actions/guides/using-github-actions-for-project-management
|
||||
- /actions/managing-issues-and-pull-requests/using-github-actions-for-project-management
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -5,6 +5,7 @@ redirect_from:
|
||||
- /actions/automating-your-workflow-with-github-actions/about-packaging-with-github-actions
|
||||
- /actions/publishing-packages-with-github-actions/about-packaging-with-github-actions
|
||||
- /actions/guides/about-packaging-with-github-actions
|
||||
- /actions/publishing-packages/about-packaging-with-github-actions
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -8,6 +8,7 @@ versions:
|
||||
ghec: '*'
|
||||
redirect_from:
|
||||
- /actions/publishing-packages-with-github-actions
|
||||
- /actions/publishing-packages
|
||||
children:
|
||||
- /about-packaging-with-github-actions
|
||||
- /publishing-docker-images
|
||||
@@ -5,6 +5,7 @@ intro: 'You can publish Docker images to a registry, such as Docker Hub or {% da
|
||||
redirect_from:
|
||||
- /actions/language-and-framework-guides/publishing-docker-images
|
||||
- /actions/guides/publishing-docker-images
|
||||
- /actions/publishing-packages/publishing-docker-images
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -5,6 +5,7 @@ intro: You can use Gradle to publish Java packages to a registry as part of your
|
||||
redirect_from:
|
||||
- /actions/language-and-framework-guides/publishing-java-packages-with-gradle
|
||||
- /actions/guides/publishing-java-packages-with-gradle
|
||||
- /actions/publishing-packages/publishing-java-packages-with-gradle
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -5,6 +5,7 @@ intro: You can use Maven to publish Java packages to a registry as part of your
|
||||
redirect_from:
|
||||
- /actions/language-and-framework-guides/publishing-java-packages-with-maven
|
||||
- /actions/guides/publishing-java-packages-with-maven
|
||||
- /actions/publishing-packages/publishing-java-packages-with-maven
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -6,6 +6,7 @@ redirect_from:
|
||||
- /actions/automating-your-workflow-with-github-actions/publishing-nodejs-packages
|
||||
- /actions/language-and-framework-guides/publishing-nodejs-packages
|
||||
- /actions/guides/publishing-nodejs-packages
|
||||
- /actions/publishing-packages/publishing-nodejs-packages
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -5,6 +5,7 @@ redirect_from:
|
||||
- /actions/automating-your-workflow-with-github-actions/about-service-containers
|
||||
- /actions/configuring-and-managing-workflows/about-service-containers
|
||||
- /actions/guides/about-service-containers
|
||||
- /actions/using-containerized-services/about-service-containers
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -6,6 +6,7 @@ redirect_from:
|
||||
- /actions/automating-your-workflow-with-github-actions/creating-postgresql-service-containers
|
||||
- /actions/configuring-and-managing-workflows/creating-postgresql-service-containers
|
||||
- /actions/guides/creating-postgresql-service-containers
|
||||
- /actions/using-containerized-services/creating-postgresql-service-containers
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -6,6 +6,7 @@ redirect_from:
|
||||
- /actions/automating-your-workflow-with-github-actions/creating-redis-service-containers
|
||||
- /actions/configuring-and-managing-workflows/creating-redis-service-containers
|
||||
- /actions/guides/creating-redis-service-containers
|
||||
- /actions/using-containerized-services/creating-redis-service-containers
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -10,6 +10,7 @@ redirect_from:
|
||||
- /actions/automating-your-workflow-with-github-actions/using-databases-and-services
|
||||
- /actions/configuring-and-managing-workflows/using-databases-and-service-containers
|
||||
- /actions/guides/using-databases-and-service-containers
|
||||
- /actions/using-containerized-services
|
||||
children:
|
||||
- /about-service-containers
|
||||
- /creating-postgresql-service-containers
|
||||
@@ -9,6 +9,7 @@ versions:
|
||||
redirect_from:
|
||||
- /actions/using-jobs/using-a-build-matrix-for-your-jobs
|
||||
- /actions/using-jobs/using-a-matrix-for-your-jobs
|
||||
- /actions/examples/using-concurrency-expressions-and-a-test-matrix
|
||||
---
|
||||
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
@@ -6,6 +6,7 @@ redirect_from:
|
||||
- /actions/guides/using-github-cli-in-workflows
|
||||
- /actions/advanced-guides/using-github-cli-in-workflows
|
||||
- /actions/using-workflows/using-github-cli-in-workflows
|
||||
- /actions/examples/using-the-github-cli-on-a-runner
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
|
||||
@@ -138,7 +138,7 @@ Code annotations only work in articles with the `layout: inline` frontmatter pro
|
||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||
```
|
||||
|
||||
For an example of an article that uses code annotations on {% data variables.product.prodname_docs %}, see "[AUTOTITLE](/actions/examples/using-scripts-to-test-your-code-on-a-runner)."
|
||||
For an example of an article that uses code annotations on {% data variables.product.prodname_docs %}, see "[AUTOTITLE](/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions)."
|
||||
|
||||
## Octicons
|
||||
|
||||
|
||||
Reference in New Issue
Block a user