Skip to content

Repo sync #39271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ registries:
type: docker-registry
url: ghcr.io
username: PAT
password: ${{secrets.CONTAINER_BUILDER_TOKEN}}
password: ${{secrets.BASE_CONTAINER_IMAGE_READER_DEPENDABOT}}

updates:
- package-ecosystem: npm
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# ---------------------------------------------------------------
# To update the sha:
# https://github.com/github/gh-base-image/pkgs/container/gh-base-image%2Fgh-base-noble
FROM ghcr.io/github/gh-base-image/gh-base-noble:20250709-201453-g6a417ef5f AS base
FROM ghcr.io/github/gh-base-image/gh-base-noble:20250711-151843-g9ff1d29c5 AS base

# Install curl for Node install and determining the early access branch
# Install git for cloning docs-early-access & translations repos
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
---
title: Using environments for deployment
shortTitle: Environments
intro: Specify a deployment environment in your workflow.
title: Deployment environments
intro: 'You can create and deploy to different environments.'
versions:
fpt: '*'
ghes: '*'
ghec: '*'
redirect_from:
- /actions/using-jobs/using-environments-for-jobs
- /actions/using-jobs/using-environments-for-deployment
- /actions/writing-workflows/choosing-what-your-workflow-does/using-environments-for-deployment
type: overview
topics:
- Actions
- Workflows
---

{% data reusables.actions.enterprise-github-hosted-runners %}

## About environments

{% data reusables.actions.about-environments %}

Each job in a workflow can reference a single environment. Any protection rules configured for the environment must pass before a job referencing the environment is sent to a runner. The job can access the environment's secrets only after the job is sent to a runner.

When a workflow references an environment, the environment will appear in the repository's deployments. For more information about viewing current and previous deployments, see [AUTOTITLE](/actions/deployment/managing-your-deployments/viewing-deployment-history).

## Using an environment in a workflow

{% data reusables.actions.environment-example %}
1 change: 1 addition & 0 deletions content/actions/concepts/workflows-and-actions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ children:
- /about-custom-actions
- /contexts
- /expressions
- /deployment-environments
- /dependency-caching
- /about-monitoring-workflows
- /notifications-for-workflow-runs
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: Deploying to a specific environment
shortTitle: Deploy to environment
intro: Specify a deployment environment in your workflow.
versions:
fpt: '*'
ghes: '*'
ghec: '*'
redirect_from:
- /actions/using-jobs/using-environments-for-jobs
- /actions/using-jobs/using-environments-for-deployment
- /actions/writing-workflows/choosing-what-your-workflow-does/using-environments-for-deployment
- /actions/how-tos/writing-workflows/choosing-what-your-workflow-does/using-environments-for-deployment
---

## Prerequisites

You need to create an environment before you can use it in a workflow. See [AUTOTITLE](/actions/how-tos/managing-workflow-runs-and-deployments/managing-deployments/managing-environments-for-deployment#creating-an-environment).

## Using an environment in a workflow

1. Open the workflow file you want to edit.
1. Use the following syntax to add a [`jobs.<job_id>.environment`](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idenvironment) key to your workflow:

```yaml copy
jobs:
JOB-ID:
environment: ENVIRONMENT-NAME
```

The chosen job will now be subject to any rules configured for the specified environment.
1. Optionally, specify a deployment URL for the environment using the following syntax:

```yaml copy
jobs:
JOB-ID:
environment: ENVIRONMENT-NAME
url: URL
```

The specified URL will appear:
* On the deployments page for the repository
* In the visualization graph for the workflow run
* (If a pull request triggers the workflow) As a "View deployment" button in the pull request timeline
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ children:
- /store-information-in-variables
- /passing-information-between-jobs
- /setting-a-default-shell-and-working-directory
- /using-environments-for-deployment
- /deploying-to-a-specific-environment
- /control-the-concurrency-of-workflows-and-jobs
- /running-variations-of-jobs-in-a-workflow
- /storing-and-sharing-data-from-a-workflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ For example, to enable Japanese and Portuguese in addition to English, you can e
> [!NOTE]
> Before you commit your changes, you should revert the `package.json` file to its original state.

The supported language codes are defined in [`src/languages/lib/languages.js`](https://github.com/github/docs/blob/main/src/languages/lib/languages.js).
The supported language codes are defined in [`src/languages/lib/languages.ts`](https://github.com/github/docs/blob/main/src/languages/lib/languages.ts).

## Using {% data variables.product.prodname_github_codespaces %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ See [`redirect_from`](https://github.com/github/docs/blob/main/content/README.md

If a URL for a page is entered without a version (`https://docs.github.com/ARTICLE` instead of `https://docs.github.com/VERSION/ARTICLE`), the site will automatically redirect it to the first available version of the page.<!-- markdownlint-disable-line search-replace -->

The order of precedence is specified in [`lib/all-versions.js`](https://github.com/github/docs/blob/main/src/versions/lib/all-versions.js). The current order of precedence is:
The order of precedence is specified in [`lib/all-versions.ts`](https://github.com/github/docs/blob/main/src/versions/lib/all-versions.ts). The current order of precedence is:

1. {% data variables.product.prodname_free_team %}, {% data variables.product.prodname_pro %}, or {% data variables.product.prodname_team %} (`fpt`)
1. {% data variables.product.prodname_ghe_cloud %} (`ghec`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ For more information, see [`lib/frontmatter.js`](https://github.com/github/docs/

### `versions`

* Purpose: Indicates the [versions](https://github.com/github/docs/blob/main/src/versions/lib/all-versions.js) to which a page applies.
* Purpose: Indicates the [versions](https://github.com/github/docs/blob/main/src/versions/lib/all-versions.ts) to which a page applies.
For more information about the different types of versioning, see [Versioning documentation](/contributing/syntax-and-versioning-for-github-docs/versioning-documentation).
* Type: `Object`. Allowable keys map to product names and can be found in the `versions` object in [`lib/frontmatter.js`](https://github.com/github/docs/blob/main/src/frame/lib/frontmatter.js).
* This frontmatter value is currently **required** for all pages.
Expand Down
2 changes: 1 addition & 1 deletion content/copilot/get-started/github-copilot-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ AI-generated text completion to help you write pull request descriptions quickly

Enhance {% data variables.copilot.copilot_chat_short %} responses by providing contextual details on your preferences, tools, and requirements. See [AUTOTITLE](/copilot/customizing-copilot/about-customizing-github-copilot-chat-responses).

### {% data variables.copilot.copilot_desktop_short %} ({% data variables.release-phases.public_preview %})
### {% data variables.copilot.copilot_desktop_short %}

Automatically generate commit messages and descriptions with {% data variables.copilot.copilot_desktop_short %} based on the changes you make to your project.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ You can configure policies for your enterprise. If no policy is chosen at the en
| ----------- | ------------------------------------------ |
| [{% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_dotcom_the_website %}](#copilot-in-githubcom) | least restrictive |
| [{% data variables.copilot.copilot_cli %}](#github-copilot-in-the-cli) | least restrictive |
| [{% data variables.copilot.copilot_desktop_short %} ({% data variables.release-phases.public_preview %})](#copilot-in-github-desktop-public-preview) | least restrictive |
| [{% data variables.copilot.copilot_desktop_short %}](#copilot-in-github-desktop) | least restrictive |
| [{% data variables.copilot.copilot_chat %} in the IDE](#github-copilot-chat-in-the-ide) | least restrictive |
| [Editor preview features](#editor-preview-features) | least restrictive |
| [{% data variables.copilot.copilot_mobile %}](#github-copilot-chat-in-github-mobile) | least restrictive |
Expand All @@ -57,7 +57,7 @@ If you enable "{% data variables.product.prodname_copilot_short %} in {% data va

{% data variables.copilot.copilot_cli %} is an extension for {% data variables.product.prodname_cli %} which provides a chat-like interface in the terminal. You can ask {% data variables.product.prodname_copilot %} for command suggestions, or for explanations of commands they run.

### {% data variables.copilot.copilot_desktop_short %} ({% data variables.release-phases.public_preview %})
### {% data variables.copilot.copilot_desktop_short %}

You can generate commit messages and descriptions in {% data variables.product.prodname_desktop %} based on the changes you make to your project.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ Organization owners can set policies to govern how {% data variables.product.pro
* Image support in {% data variables.copilot.copilot_chat_short %} (available in {% data variables.product.prodname_vscode_shortname %} and {% data variables.product.prodname_vs %})
>[!NOTE] This setting only applies to preview features within {% data variables.product.prodname_copilot_short %} and does not control all preview-related settings in {% data variables.product.prodname_vscode_shortname %}.
* {% data variables.copilot.copilot_coding_agent %} ({% data variables.release-phases.public_preview %})
* {% data variables.copilot.copilot_spaces %} (public preview)
* {% data variables.copilot.copilot_spaces %} ({% data variables.release-phases.public_preview %})
* MCP servers on {% data variables.product.prodname_dotcom_the_website %} ({% data variables.release-phases.public_preview %})
* {% data variables.copilot.copilot_mobile_short %}
* {% data variables.copilot.copilot_cli_short %} and {% data variables.product.prodname_windows_terminal %}
* {% data variables.copilot.copilot_desktop_short %} ({% data variables.release-phases.public_preview %})
* {% data variables.copilot.copilot_desktop_short %}
* Suggestions matching public code
* Access to alternative models for {% data variables.product.prodname_copilot_short %}
* Anthropic {% data variables.copilot.copilot_claude %} in {% data variables.product.prodname_copilot_short %}
Expand Down Expand Up @@ -65,7 +65,7 @@ If an organization member is assigned a seat by multiple organizations with diff

For example, to enable or disable suggestion matching, in the "Suggestions matching public code" dropdown, select **Allowed** or **Blocked**.

1. If your organization has a {% data variables.copilot.copilot_business_short %}{% ifversion ghec %} or {% data variables.copilot.copilot_enterprise_short %}{% endif %} plan and you enable "{% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_dotcom_the_website %}", two additional options are displayed:
1. If your organization has a {% data variables.copilot.copilot_business_short %}{% ifversion ghec %} or {% data variables.copilot.copilot_enterprise_short %}{% endif %} plan and you enable "{% data variables.product.prodname_copilot_short %} in {% data variables.product.prodname_dotcom_the_website %}," two additional options are displayed:

{% data reusables.copilot.policies-for-dotcom %}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ You can create a custom instructions file in your repository via the {% data var
Whitespace between instructions is ignored, so the instructions can be written as a single paragraph, each on a new line, or separated by blank lines for legibility.

1. Open the {% data variables.product.prodname_copilot %} for Xcode application.
1. At the top of the application window, click **Advanced**.
1. At the top of the application window, under **Settings**, click **Advanced**.
1. To the right of "Custom Instructions", click **Current Workspace** or **Global** to choose whether the custom instructions apply to the current workspace or all workspaces.

{% endxcode %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ Repository administrators can enable rulesets for a branch to enforce specific c

1. [Create a new branch](/desktop/making-changes-in-a-branch/managing-branches-in-github-desktop), or select an existing branch by clicking **{% octicon "git-branch" aria-hidden="true" aria-label="git-branch" %} Current Branch** on the toolbar and selecting the branch from the list.

![Screenshot of the "Current Branch" dropdown view. Under "Recent Branches", a branch, named "my-feature", is highlighted with an orange outline.](/assets/images/help/desktop/select-branch-from-dropdown.png)
![Screenshot of the "Current Branch" dropdown view. Under "Recent Branches," a branch, named "my-feature," is highlighted with an orange outline.](/assets/images/help/desktop/select-branch-from-dropdown.png)
{% data reusables.desktop.make-changes %}

## Choosing how to display diffs

You can change the way diffs are displayed in {% data variables.product.prodname_desktop %} to suit your reviewing needs.

To change how you view diffs, in the top-right corner of the diff view, click {% octicon "gear" aria-label="The Gear icon" %}.
* To change how the entire diff is displayed, under "Diff display", select **Unified** or **Split**. The Unified view shows changes linearly, while the Split view shows old content on the left side and new content on the right side.
* To change how the entire diff is displayed, under "Diff display," select **Unified** or **Split**. The Unified view shows changes linearly, while the Split view shows old content on the left side and new content on the right side.
* To hide whitespace changes so you can focus on more substantive changes, select **Hide Whitespace Changes**.

![Screenshot of the diff view of a file. A gear icon is outlined in orange and expanded to display "Whitespace" and "Diff display" settings.](/assets/images/help/desktop/diff-selection.png)
Expand All @@ -43,7 +43,7 @@ If you need to see more of the file than {% data variables.product.prodname_desk
* To see the next few lines above or below the highlighted changes, click the arrow above or below the line numbers.
* To see the entire file, right-click in the diff view and click **Expand Whole File**.

![Screenshot of the diff view of a "README" file. Over a green "addition" line, in a context menu, the cursor hovers over "Expand Whole File".](/assets/images/help/desktop/expand-diff-view.png)
![Screenshot of the diff view of a "README" file. Over a green "addition" line, in a context menu, the cursor hovers over "Expand Whole File."](/assets/images/help/desktop/expand-diff-view.png)

## Selecting changes to include in a commit

Expand All @@ -57,7 +57,7 @@ In the "Changes" tab in the left sidebar:
* To access stashed changes, click **Stashed Changes**.
* {% data reusables.desktop.commit-all-desc %}

![Screenshot of the "Changes" tab. Above the list of changed files, next to the text "3 changed files", a selected checkbox is outlined in orange.](/assets/images/help/desktop/commit-all.png)
![Screenshot of the "Changes" tab. Above the list of changed files, next to the text "3 changed files," a selected checkbox is outlined in orange.](/assets/images/help/desktop/commit-all.png)
* {% data reusables.desktop.commit-some-desc %}

### Creating a partial commit
Expand All @@ -79,7 +79,7 @@ Discarded changes are saved in a dated file in the Trash. You can recover discar
{% data reusables.desktop.select-discard-files %}
{% data reusables.desktop.click-discard-files %}

![Screenshot of the "Changes" tab. Two selected files are highlighted in blue. In a context menu, the cursor hovers over "Discard 2 Selected Changes".](/assets/images/help/desktop/discard-changes-mac.png)
![Screenshot of the "Changes" tab. Two selected files are highlighted in blue. In a context menu, the cursor hovers over "Discard 2 Selected Changes."](/assets/images/help/desktop/discard-changes-mac.png)
{% data reusables.desktop.confirm-discard-files %}

### Discarding changes in one or more lines
Expand All @@ -91,7 +91,7 @@ You can discard one or more changed lines that are uncommitted.

To discard one added line, in the list of changed lines, right-click the line number of the line you want to discard, then select **Discard Added Line**.

![Screenshot of the diff view of a file. In a context menu, a cursor hovers over "Discard Added Line", highlighted in blue.](/assets/images/help/desktop/discard-single-line.png)
![Screenshot of the diff view of a file. In a context menu, a cursor hovers over "Discard Added Line," highlighted in blue.](/assets/images/help/desktop/discard-single-line.png)

To discard a group of changed lines, right-click the vertical bar to the right of the line numbers for the lines you want to discard, then select **Discard added lines**.

Expand All @@ -105,7 +105,8 @@ Once you're satisfied with the changes you've chosen to include in your commit,
> {% data reusables.desktop.tags-push-with-commits %} For more information, see [AUTOTITLE](/desktop/managing-commits/managing-tags-in-github-desktop).

1. At the bottom of the list of changes, next to your profile picture, describe your commit:
* If you have access to {% data variables.product.prodname_copilot %} and you are using [{% data variables.product.prodname_desktop %} beta](https://desktop.github.com/beta/), you can automatically create a commit message and details based on the changes you made. Click {% octicon "copilot" aria-label="Generate commit message with Copilot" %}.
* If you have access to {% data variables.product.prodname_copilot %}, you can automatically create a commit message and details based on the changes you made. Click {% octicon "copilot" aria-label="Generate commit message with Copilot" %}.
* If you want to regenerate a different commit message, click {% octicon "copilot" aria-label="Regenerate commit message with Copilot" %} again to generate a new suggestion.
* Alternatively, type your own short, meaningful commit message in the Summary field. You can also add more information about the change in the Description field.

![Screenshot of the "Changes" tab. The "Summary" field and "Generate commit message with Copilot" button are outlined in orange.](/assets/images/help/desktop/create-commit-details.png)
Expand All @@ -125,7 +126,7 @@ Once you're satisfied with the changes you've chosen to include in your commit,

If a pull request has not been created for the current branch, {% data variables.product.prodname_desktop %} will give you the option to preview the changes and create one. For more information, see [AUTOTITLE](/desktop/working-with-your-remote-repository-on-github-or-github-enterprise/creating-an-issue-or-pull-request-from-github-desktop).

![Screenshot of the "No local changes" view. A button, labeled "Preview Pull Request", is highlighted with an orange outline.](/assets/images/help/desktop/mac-preview-pull-request.png)
![Screenshot of the "No local changes" view. A button, labeled "Preview Pull Request," is highlighted with an orange outline.](/assets/images/help/desktop/mac-preview-pull-request.png)

## Managing your commit history

Expand Down
3 changes: 3 additions & 0 deletions src/content-render/unified/rewrite-local-links.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// When updating this file to typescript,
// update links in content/contributing as well

import path from 'path'

import stripAnsi from 'strip-ansi'
Expand Down
3 changes: 3 additions & 0 deletions src/frame/lib/frontmatter.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// when updating to typescript,
// update links in content/contributing as well

import parse from './read-frontmatter'
import { allVersions } from '@/versions/lib/all-versions'
import { allTools } from '@/tools/lib/all-tools'
Expand Down
Loading
Loading