1
0
mirror of synced 2026-01-05 03:06:35 -05:00

Merge branch 'main' into github-community-org-level-discussion

This commit is contained in:
Sarita Iyer
2022-07-28 16:11:15 -04:00
committed by GitHub
52 changed files with 345 additions and 167 deletions

View File

@@ -2,7 +2,7 @@
import { v4 as uuidv4 } from 'uuid'
import Cookies from 'js-cookie'
import parseUserAgent from './user-agent'
import { getSession, fetchSession } from './get-session'
import { getSession } from './get-session'
const COOKIE_NAME = '_docs-events'
@@ -274,8 +274,13 @@ function initPrintEvent() {
})
}
function waitForSession(fn: Function) {
if (getSession()) return fn()
setTimeout(() => waitForSession(fn), 300)
}
export default function initializeEvents() {
fetchSession().then(() => {
waitForSession(() => {
initPageAndExitEvent() // must come first
initLinkEvent()
initClipboardEvent()

View File

@@ -47,12 +47,16 @@ export async function fetchSession(): Promise<Session | null> {
}
// React hook version
const setFns = new Set<Function>()
export function useSession() {
const [session, setSession] = useState<Session | null>(sessionCache)
setFns.add(setSession)
const { asPath } = useRouter()
// Only call `fetchSession` on the client
useEffect(() => {
fetchSession().then((session) => setSession(session))
fetchSession().then((session) => {
setFns.forEach((setSession) => setSession(session))
})
}, [asPath])
return session
}

View File

@@ -378,15 +378,15 @@ translations/zh-CN/data/reusables/dependency-submission/about-dependency-submiss
translations/zh-CN/data/reusables/dotcom_billing/downgrade-org-to-free.md,broken liquid tags
translations/zh-CN/data/reusables/education/access-github-community-exchange.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise-accounts/emu-password-reset-session.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise-accounts/emu-short-summary.md,rendering error
translations/zh-CN/data/reusables/enterprise-accounts/emu-short-summary.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise-licensing/about-license-sync.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise-licensing/verified-domains-license-sync.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise-licensing/you-can-sync-for-a-combined-view.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise_installation/hardware-considerations-all-platforms.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise_management_console/badge_indicator.md,broken liquid tags
translations/zh-CN/data/reusables/enterprise_user_management/consider-usernames-for-external-authentication.md,rendering error
translations/zh-CN/data/reusables/enterprise_user_management/consider-usernames-for-external-authentication.md,broken liquid tags
translations/zh-CN/data/reusables/gated-features/codespaces-classroom-articles.md,broken liquid tags
translations/zh-CN/data/reusables/gated-features/enterprise-accounts.md,rendering error
translations/zh-CN/data/reusables/gated-features/enterprise-accounts.md,broken liquid tags
translations/zh-CN/data/reusables/gated-features/packages.md,broken liquid tags
translations/zh-CN/data/reusables/gated-features/secret-scanning-partner.md,broken liquid tags
translations/zh-CN/data/reusables/gated-features/secret-scanning.md,broken liquid tags
@@ -404,14 +404,13 @@ translations/zh-CN/data/reusables/package_registry/authenticate_with_pat_for_con
translations/zh-CN/data/reusables/package_registry/docker_registry_deprecation_status.md,Listed in localization-support#489
translations/zh-CN/data/reusables/package_registry/next-steps-for-packages-enterprise-setup.md,broken liquid tags
translations/zh-CN/data/reusables/package_registry/packages-cluster-support.md,broken liquid tags
translations/zh-CN/data/reusables/pages/check-workflow-run.md,broken liquid tags
translations/zh-CN/data/reusables/pages/pages-builds-with-github-actions-public-beta.md,broken liquid tags
translations/zh-CN/data/reusables/repositories/deleted_forks_from_private_repositories_warning.md,broken liquid tags
translations/zh-CN/data/reusables/repositories/enable-security-alerts.md,broken liquid tags
translations/zh-CN/data/reusables/repositories/select-marketplace-apps.md,broken liquid tags
translations/zh-CN/data/reusables/saml/saml-session-oauth.md,rendering error
translations/zh-CN/data/reusables/saml/saml-session-oauth.md,broken liquid tags
translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md,Listed in localization-support#489
translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md,rendering error
translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md,broken liquid tags
translations/zh-CN/data/reusables/scim/after-you-configure-saml.md,broken liquid tags
translations/zh-CN/data/reusables/secret-scanning/enterprise-enable-secret-scanning.md,broken liquid tags
translations/zh-CN/data/reusables/secret-scanning/partner-program-link.md,broken liquid tags
1 file reason
378 translations/zh-CN/data/reusables/dotcom_billing/downgrade-org-to-free.md broken liquid tags
379 translations/zh-CN/data/reusables/education/access-github-community-exchange.md broken liquid tags
380 translations/zh-CN/data/reusables/enterprise-accounts/emu-password-reset-session.md broken liquid tags
381 translations/zh-CN/data/reusables/enterprise-accounts/emu-short-summary.md rendering error broken liquid tags
382 translations/zh-CN/data/reusables/enterprise-licensing/about-license-sync.md broken liquid tags
383 translations/zh-CN/data/reusables/enterprise-licensing/verified-domains-license-sync.md broken liquid tags
384 translations/zh-CN/data/reusables/enterprise-licensing/you-can-sync-for-a-combined-view.md broken liquid tags
385 translations/zh-CN/data/reusables/enterprise_installation/hardware-considerations-all-platforms.md broken liquid tags
386 translations/zh-CN/data/reusables/enterprise_management_console/badge_indicator.md broken liquid tags
387 translations/zh-CN/data/reusables/enterprise_user_management/consider-usernames-for-external-authentication.md rendering error broken liquid tags
388 translations/zh-CN/data/reusables/gated-features/codespaces-classroom-articles.md broken liquid tags
389 translations/zh-CN/data/reusables/gated-features/enterprise-accounts.md rendering error broken liquid tags
390 translations/zh-CN/data/reusables/gated-features/packages.md broken liquid tags
391 translations/zh-CN/data/reusables/gated-features/secret-scanning-partner.md broken liquid tags
392 translations/zh-CN/data/reusables/gated-features/secret-scanning.md broken liquid tags
404 translations/zh-CN/data/reusables/package_registry/docker_registry_deprecation_status.md Listed in localization-support#489
405 translations/zh-CN/data/reusables/package_registry/next-steps-for-packages-enterprise-setup.md broken liquid tags
406 translations/zh-CN/data/reusables/package_registry/packages-cluster-support.md broken liquid tags
translations/zh-CN/data/reusables/pages/check-workflow-run.md broken liquid tags
407 translations/zh-CN/data/reusables/pages/pages-builds-with-github-actions-public-beta.md broken liquid tags
408 translations/zh-CN/data/reusables/repositories/deleted_forks_from_private_repositories_warning.md broken liquid tags
409 translations/zh-CN/data/reusables/repositories/enable-security-alerts.md broken liquid tags
410 translations/zh-CN/data/reusables/repositories/select-marketplace-apps.md broken liquid tags
411 translations/zh-CN/data/reusables/saml/saml-session-oauth.md rendering error broken liquid tags
412 translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md Listed in localization-support#489
413 translations/zh-CN/data/reusables/saml/you-must-periodically-authenticate.md rendering error broken liquid tags
414 translations/zh-CN/data/reusables/scim/after-you-configure-saml.md broken liquid tags
415 translations/zh-CN/data/reusables/secret-scanning/enterprise-enable-secret-scanning.md broken liquid tags
416 translations/zh-CN/data/reusables/secret-scanning/partner-program-link.md broken liquid tags

View File

@@ -252,4 +252,6 @@ restore-keys: |
您可以使用 {% data variables.product.product_name %} REST API 来管理缓存。 {% ifversion actions-cache-list-delete-apis %}您可以使用 API 列出和删除缓存条目,并查看缓存使用情况。{% elsif actions-cache-management %}目前,您可以使用 API 查看缓存使用情况,预计在将来的更新中会有更多的功能。{% endif %} 有关详细信息,请参阅“[{% data variables.product.prodname_actions %} 缓存](/rest/actions/cache)”REST API 文档。
You can also install a {% data variables.product.prodname_cli %} extension to manage your caches from the command line. For more information about the extension, see [the extension documentation](https://github.com/actions/gh-actions-cache#readme). For more information about {% data variables.product.prodname_cli %} extensions, see "[Using GitHub CLI extensions](/github-cli/github-cli/using-github-cli-extensions)."
{% endif %}

View File

@@ -415,7 +415,7 @@ on:
{% data reusables.actions.branch-requirement %}
当有人推送到作为 {% data variables.product.prodname_pages %} 的发布源的分支时,如果为存储库启用了 {% data variables.product.prodname_pages %} ,则运行工作流程。 有关 {% data variables.product.prodname_pages %} 发布源的详细信息,请参阅“[为 GitHub Pages 站点配置发布源](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#choosing-a-publishing-source)”。 有关 REST API 的信息,请参阅“[页面](/rest/reference/repos#pages)”。
当有人推送到作为 {% data variables.product.prodname_pages %} 的发布源的分支时,如果为存储库启用了 {% data variables.product.prodname_pages %} ,则运行工作流程。 有关 {% data variables.product.prodname_pages %} 发布源的详细信息,请参阅“[为 GitHub Pages 站点配置发布源](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)”。 有关 REST API 的信息,请参阅“[页面](/rest/reference/repos#pages)”。
例如,您可以在发生 `page_build` 事件时运行工作流程。
@@ -896,9 +896,9 @@ jobs:
### `推送`
| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` |
| ---------------------------------------------------------------------------------- | ---- | ---------------------- | ------------ |
| [`推送`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#push) | n/a | 推送的提交,除非删除分支(当它是默认分支时) | 更新的引用 |
| Web 挂钩事件有效负载 | 活动类型 | `GITHUB_SHA` | `GITHUB_REF` |
| ---------------------------------------------------------------------------------- | ---- | -------------------------------------------------------------------------------------------------------------------------------- | ------------ |
| [`推送`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#push) | n/a | When you delete a branch, the SHA in the workflow run (and its associated refs) reverts to the default branch of the repository. | 更新的引用 |
{% note %}

View File

@@ -44,8 +44,9 @@ redirect_from:
### {% data variables.product.prodname_codespaces %} 预构建的计费
{% data reusables.codespaces.billing-for-prebuilds-default %}
{% data reusables.codespaces.billing-for-prebuilds %}
{% data reusables.codespaces.billing-for-prebuilds-reducing %}
## 设置支出限制

View File

@@ -33,14 +33,14 @@ redirect_from:
{% data variables.product.prodname_dependabot %} is able to trigger {% data variables.product.prodname_actions %} workflows on its pull requests and comments; however, certain events are treated differently.
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5792 %}
For workflows initiated by {% data variables.product.prodname_dependabot %} (`github.actor == "dependabot[bot]"`) using the `pull_request`, `pull_request_review`, `pull_request_review_comment`, `push`, `create`, `deployment`, and `deployment_status` events, the following restrictions apply:
For workflows initiated by {% data variables.product.prodname_dependabot %} (`github.actor == 'dependabot[bot]'`) using the `pull_request`, `pull_request_review`, `pull_request_review_comment`, `push`, `create`, `deployment`, and `deployment_status` events, the following restrictions apply:
{% endif %}
- {% ifversion ghes = 3.3 %}`GITHUB_TOKEN` has read-only permissions, unless your administrator has removed restrictions.{% else %}`GITHUB_TOKEN` has read-only permissions by default.{% endif %}
- {% ifversion ghes = 3.3 %}Secrets are inaccessible, unless your administrator has removed restrictions.{% else %}Secrets are populated from {% data variables.product.prodname_dependabot %} secrets. {% data variables.product.prodname_actions %} secrets are not available.{% endif %}
{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5792 %}
For workflows initiated by {% data variables.product.prodname_dependabot %} (`github.actor == "dependabot[bot]"`) using the `pull_request_target` event, if the base ref of the pull request was created by {% data variables.product.prodname_dependabot %} (`github.actor == "dependabot[bot]"`), the `GITHUB_TOKEN` will be read-only and secrets are not available.
For workflows initiated by {% data variables.product.prodname_dependabot %} (`github.actor == 'dependabot[bot]'`) using the `pull_request_target` event, if the base ref of the pull request was created by {% data variables.product.prodname_dependabot %} (`github.actor == 'dependabot[bot]'`), the `GITHUB_TOKEN` will be read-only and secrets are not available.
{% endif %}
{% ifversion actions-stable-actor-ids %}These restrictions apply even if the workflow is re-run by a different actor.{% endif %}

View File

@@ -111,7 +111,7 @@ shortTitle: 创建代码空间
**注:**
* 您可以为选项页面添加书签,以便快速为此存储库和分支创建代码空间。
* [https://github.com/codespaces/new](https://github.com/codespaces/new) 页面提供了一种为任何存储库和分支创建代码空间的快速方法。
* [https://github.com/codespaces/new](https://github.com/codespaces/new) 页面提供了一种为任何存储库和分支创建代码空间的快速方法。 You can get to this page quickly by typing `codespace.new` into your browser's address bar.
* 有关 `devcontainer.json` 文件的详细信息,请参阅“[开发容器简介](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#devcontainerjson)”。
* 有关计算机类型的详细信息,请参阅“[更改代码空间的计算机类型](/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace#about-machine-types)”。
* {% data reusables.codespaces.codespaces-machine-type-availability %}
@@ -152,10 +152,10 @@ gh codespace create
gh codespace create -r <em>owner</em>/<em>repo</em> -b <em>branch</em> -m <em>machine-type</em>
```
`owner/repo` 替换为仓库标识符。`branch` 替换为您希望在代码空间中最初检出的分支的名称或提交的完整 SHA 哈希。 如果使用 `-r` 标志而不使用 `b` 标志,则将从默认分支创建代码空间。
In this example, replace `owner/repo` with the repository identifier.`branch` 替换为您希望在代码空间中最初检出的分支的名称或提交的完整 SHA 哈希。 如果使用 `-r` 标志而不使用 `b` 标志,则将从默认分支创建代码空间。
`machine-type` 替换为可用计算机类型的有效标识符。 标识符是字符串,例如:`basicLinux32gb``standardLinux32gb`。 可用的计算机类型取决于仓库、您的个人帐户和您的位置。 如果输入无效或不可用的计算机类型,则错误消息中将显示可用类型。 如果省略此标志,并且有多个计算机类型可用,系统将提示您从列表中选择一个计算机类型。
有关此命令的详细信息,请参阅 [{% data variables.product.prodname_cli %} 手册](https://cli.github.com/manual/gh_codespace_create)
For full details of the options for this command, see [the {% data variables.product.prodname_cli %} manual](https://cli.github.com/manual/gh_codespace_create).
{% endcli %}

View File

@@ -20,13 +20,13 @@ redirect_from:
{% warning %}
**弃用说明**:访问和安全设置现已弃用。 要启用对其他存储库的扩展访问权限,请将请求的权限添加到开发容器定义中。 更多信息请参阅“[管理代码空间中对其他存储库的访问](/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces)”。
**Deprecation note**: The access and security setting described below is now deprecated and is documented here for reference only. 要启用对其他存储库的扩展访问权限,请将请求的权限添加到开发容器定义中。 更多信息请参阅“[管理代码空间中对其他存储库的访问](/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces)”。
{% endwarning %}
默认情况下,代码空间只能访问创建它的仓库。 当您为组织拥有的存储库启用访问和安全性时,为该存储库创建的任何代码空间也将对组织拥有的所有其他存储库具有读取权限,并且代码空间创建者具有访问权限。 如果要限制代码空间可以访问的存储库,可以将其限制为创建代码空间的存储库或特定存储库。 您应该只对您信任的仓库启用访问和安全。
要管理组织中的哪些用户可以使用 {% data variables.product.prodname_github_codespaces %},请参阅“[管理组织的用户权限](/codespaces/managing-codespaces-for-your-organization/managing-user-permissions-for-your-organization)”。
To manage which users in your organization can use {% data variables.product.prodname_github_codespaces %}, see "[Enabling GitHub Codespaces for your organization](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization#enable-codespaces-for-users-in-your-organization)."
{% data reusables.profile.access_org %}
{% data reusables.profile.org_settings %}

View File

@@ -105,7 +105,7 @@ redirect_from:
## 授权请求的权限
如果在 `devcontainer.json` 文件中定义了其他存储库权限,则在为此存储库创建代码空间时,系统将提示您查看并选择性地授权这些权限。 当您为存储库授权权限时,除非存储库的请求权限集已更改,否则 {% data variables.product.prodname_codespaces %} 不会重新提示您。
If additional repository permissions are defined in the `devcontainer.json` file, you will be prompted to review and optionally authorize the permissions when you create a codespace or a prebuild configuration for this repository. 当您为存储库授权权限时,除非存储库的请求权限集已更改,否则 {% data variables.product.prodname_codespaces %} 不会重新提示您。
![请求的权限页面](/assets/images/help/codespaces/codespaces-accept-permissions.png)
@@ -117,7 +117,7 @@ redirect_from:
{% warning %}
**弃用说明**:现在不推荐使用个人帐户设置的 {% data variables.product.prodname_codespaces %} 部分中的访问和安全设置。 要启用对其他存储库的扩展访问权限,请将请求的权限添加到代码空间的开发容器定义中,如上所述。
**Deprecation note**: The access and security setting described below is now deprecated and is documented here for reference only. 要启用对其他存储库的扩展访问权限,请将请求的权限添加到代码空间的开发容器定义中,如上所述。
{% endwarning %}

View File

@@ -18,19 +18,15 @@ redirect_from:
默认情况下,每当您将更改推送到存储库时,{% data variables.product.prodname_github_codespaces %} 都会使用 {% data variables.product.prodname_actions %} 自动更新您的预构建。
当预构建可用于存储库的特定分支以及您所在的地区时,则创建代码空间时在计算机类型选项列表中会看到“{% octicon "zap" aria-label="The zap icon" %} 预构建就绪”标签。 如果仍在创建预构建,您将看到“{% octicon "history" aria-label="The history icon" %} 预构建正在进行中”标签。 更多信息请参阅“[创建代码空间](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)”。
When prebuilds are available for a particular branch of a repository, a particular dev container configuration file, and for your region, you'll see the "{% octicon "zap" aria-label="The zap icon" %} Prebuild ready" label in the list of machine type options when you create a codespace. 如果仍在创建预构建,您将看到“{% octicon "history" aria-label="The history icon" %} 预构建正在进行中”标签。 更多信息请参阅“[创建代码空间](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)”。
![用于选择计算机类型的对话框](/assets/images/help/codespaces/choose-custom-machine-type.png)
{% note %}
{% data reusables.codespaces.prebuilds-not-available %}
{% endnote %}
## 关于 {% data variables.product.prodname_codespaces %} 预构建的计费
{% data reusables.codespaces.billing-for-prebuilds %} 有关 {% data variables.product.prodname_codespaces %} 存储定价的详细信息,请参阅“[关于 {% data variables.product.prodname_github_codespaces %} 的计费](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces)”。
{% data reusables.codespaces.billing-for-prebuilds-default %} 有关 {% data variables.product.prodname_codespaces %} 存储定价的详细信息,请参阅“[关于 {% data variables.product.prodname_github_codespaces %} 的计费](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces)”。
{% data reusables.codespaces.billing-for-prebuilds-reducing %}
使用预构建创建的代码空间的费用与常规代码空间相同。

View File

@@ -0,0 +1,63 @@
---
title: Allowing a prebuild to access other repositories
shortTitle: Allow external repo access
intro: 'You can permit your prebuild template access to other {% data variables.product.prodname_dotcom %} repositories so that it can be built successfully.'
versions:
fpt: '*'
ghec: '*'
type: how_to
topics:
- Codespaces
- Set up
product: '{% data reusables.gated-features.codespaces %}'
permissions: People with admin access to a repository can configure prebuilds for the repository.
---
默认情况下,预构建配置的 {% data variables.product.prodname_actions %} 工作流程只能访问其自己的存储库内容。 Your project may use additional resources, located elsewhere, to build the development environment.
## Allowing a prebuild read access external resources
You can configure read access to other {% data variables.product.prodname_dotcom %} repositories, with the same repository owner, by specifying permissions in the `devcontainer.json` file used by your prebuild configuration. 更多信息请参阅“[管理代码空间中对其他存储库的访问](/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces)”。
{% note %}
**Note**: You can only authorize read permissions in this way, and the owner of the target repository must be the same as the owner of the repository for which you're creating a prebuild. For example, if you're creating a prebuild configuration for the `octo-org/octocat` repository, then you'll be able to grant read permissions for other `octo-org/*` repositories if this is specified in the `devcontainer.json` file, and provided you have the permissions yourself.
{% endnote %}
When you create or edit a prebuild configuration for a `devcontainer.json` file that sets up read access to other repositories with the same repository owner, you'll be prompted to grant these permissions when you click **Create** or **Update**. 更多信息请参阅“[配置预构建](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-a-prebuild)”。
## Allowing a prebuild write access external resources
If your project requires write access to resources, or if the external resources reside in a repository with a different owner to the repository for which you are creating a prebuild configuration, you can use a personal access token (PAT) to grant this access.
You will need to create a new personal account and then use this account to create a PAT with the appropriate scopes.
1. 在 {% data variables.product.prodname_dotcom %} 上创建新的个人帐户。
{% warning %}
**警告**:虽然您可以使用现有的个人帐户生成 PAT但我们强烈建议您创建一个只能访问方案所需目标存储库的新帐户。 这是因为访问令牌的 `repository` 权限授予访问对帐户有权访问的所有存储库。 更多信息请参阅“[注册新的 GitHub 帐户](/get-started/signing-up-for-github/signing-up-for-a-new-github-account)”和“[ {% data variables.product.prodname_actions %} 的安全强化](/actions/security-guides/security-hardening-for-github-actions#considering-cross-repository-access)”。
{% endwarning %}
1. 向新帐户授予对所需存储库的读取访问权限。 更多信息请参阅“[管理个人对组织仓库的访问](/organizations/managing-access-to-your-organizations-repositories/managing-an-individuals-access-to-an-organization-repository)”。
1. 登录到新帐户时,创建 `repo` 范围的 PAT。 (可选)如果预构建需要从 {% data variables.product.company_short %} {% data variables.product.prodname_container_registry %} 下载包,还要选择 `read:packages` 作用域。 更多信息请参阅“[创建个人访问令牌](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)”。
![为 PAT 选择的 'repo' 和 'packages' 作用域](/assets/images/help/codespaces/prebuilds-select-scopes.png)
如果预构建将使用 {% data variables.product.company_short %} {% data variables.product.prodname_container_registry %} 中的软件包,则需要向新帐户授予对软件包的访问权限,或者将软件包配置为继承要预构建的存储库的访问权限。 更多信息请参阅“[配置包的访问控制和可见性](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)”。
{% ifversion ghec %}1. 授权令牌与 SAML 单点登录 (SSO) 一起使用,以便它可以访问启用了 SSO 的组织所拥有的存储库。 更多信息请参阅“[授权个人访问令牌用于 SAML 单点登录](/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on)”。
![用于为 PAT 配置 SSO 的按钮](/assets/images/help/codespaces/configure-SSO-for-PAT.png)
{% endif %}
1. 复制令牌字符串。 您将此密钥分配给 {% data variables.product.prodname_codespaces %} 存储库机密。
1. 重新登录到对存储库具有管理员访问权限的帐户。
1. 在要为其创建 {% data variables.product.prodname_codespaces %} 预构建的存储库中,创建一个名为 `CODESPACES_PREBUILD_TOKEN` 的新 {% data variables.product.prodname_codespaces %} 存储库机密,为其提供您创建和复制的令牌值。 更多信息请参阅“[管理用于 {% data variables.product.prodname_github_codespaces %} 的仓库和组织的加密密钥](/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-github-codespaces#adding-secrets-for-a-repository)”。
PAT 将用于为存储库创建的所有后续预构建模板。 与其他 {% data variables.product.prodname_codespaces %} 存储库机密不同, `CODESPACES_PREBUILD_TOKEN` 机密仅用于预构建,不可用于从存储库创建的代码空间。
## 延伸阅读
- “[配置预构建](/codespaces/prebuilding-your-codespaces/configuring-prebuilds)”
- “[预构建疑难解答](/codespaces/troubleshooting/troubleshooting-prebuilds)”

View File

@@ -13,13 +13,11 @@ product: '{% data reusables.gated-features.codespaces %}'
permissions: People with admin access to a repository can configure prebuilds for the repository.
---
您可以为存储库的特定分支设置预构建配置。
You can set up a prebuild configuration for the combination of a specific branch of your repository with a specific dev container configuration file.
从启用了预构建的基础分支创建的任何分支通常也会在代码空间创建期间分配一个预构建。 如果分支上的开发容器与基本分支上的开发容器相同,则会出现这种情况。 这是因为具有相同开发容器配置的分支的大多数预构建配置都相同,因此开发人员也可以从这些分支上更快的代码空间创建时间中受益。 更多信息请参阅“[开发容器简介](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)”。
Any branches created from a prebuild-enabled parent branch will typically also get prebuilds for the same dev container configuration. This is because the prebuild template for child branches that use the same dev container configuration as the parent branch are, for the most part, identical, so developers can benefit from faster codespace creation times on those branches also. 更多信息请参阅“[开发容器简介](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers)”。
通常,在为分支配置预构建时,预构建将可用于该分支的 {% data variables.product.prodname_github_codespaces %} 计算机类型。 但是,如果存储库大于 32 GB则预构建将不适用于 2 核和 4 核计算机类型,因为它们提供的存储限制为 32 GB。
{% data reusables.codespaces.prebuilds-not-available %}
Typically, when you configure prebuilds for a branch, prebuilds will be available for multiple machine types. 但是,如果存储库大于 32 GB则预构建将不适用于 2 核和 4 核计算机类型,因为它们提供的存储限制为 32 GB。
## 基本要求
@@ -32,20 +30,24 @@ permissions: People with admin access to a repository can configure prebuilds fo
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
1. 在边栏的“Code & automation代码和自动化”部分中单击 **{% octicon "codespaces" aria-label="The Codespaces icon" %}{% data variables.product.prodname_codespaces %}**。
1. 在“Prebuild configuration(预构建配置)”下,单击 **Set up prebuild(设置预构建)**
1. In the "Prebuild configuration" section of the page, click **Set up prebuild**.
![“设置预构建”按钮](/assets/images/help/codespaces/prebuilds-set-up.png)
1. 选择要为其设置预构建的分支。
![分支下拉菜单](/assets/images/help/codespaces/prebuilds-choose-branch.png)
![The branch drop-down menu](/assets/images/help/codespaces/prebuilds-choose-branch.png)
{% note %}
**注意**:从启用了预构建的基本分支创建的任何分支通常也会获得预构建。 例如,如果为存储库的默认分支启用预构建,则在大多数情况下,基于默认分支的分支也将获得预构建。
**Note**: Any branches created from a prebuild-enabled base branch will typically also get prebuilds for the same dev container configuration. For example, if you enable prebuilds for a dev container configuration file on the default branch of the repository, branches based on the default branch will, in most cases, also get prebuilds for the same dev container configuration.
{% endnote %}
1. Optionally, in the **Configuration file** drop-down menu that's displayed, choose the `devcontainer.json` configuration file that you want to use for this prebuild template. 更多信息请参阅“[开发容器简介](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#devcontainerjson)”。
![The configuration file drop-down menu](/assets/images/help/codespaces/prebuilds-choose-configfile.png)
1. 选择自动触发预构建模板更新的方式。
* **每次推送**(默认设置)- 使用此设置,每次推送到给定分支时,都会更新预构建配置。 这将确保从预构建模板生成的代码空间始终包含最新的代码空间配置,包括任何最近添加或更新的依赖项。
@@ -54,19 +56,19 @@ permissions: People with admin access to a repository can configure prebuilds fo
![预构建触发器选项](/assets/images/help/codespaces/prebuilds-triggers.png)
1. 选择 **Reduce prebuild available to only specific regions(减少仅对特定区域可用的预构建)**以限制对预构建映像的访问,然后选择希望其在哪些区域可用。 开发人员只能从预构建创建代码空间(如果它们位于所选区域中)。 默认情况下,预构建的映像可用于代码空间可用的所有区域,并且每个区域都适用存储成本。
1. Optionally, select **Reduce prebuild available to only specific regions** to limit access to your prebuild template, then select which regions you want it to be available in. 开发人员只能从预构建创建代码空间(如果它们位于所选区域中)。 By default, your prebuild template is available to all regions where codespaces is available and storage costs apply for each region.
![区域选择选项](/assets/images/help/codespaces/prebuilds-regions.png)
{% note %}
**注意**
* 每个区域的预构建模板将产生单独的费用。 因此,您应仅为已知将使用预构建的区域启用预构建。 更多信息请参阅“[关于 {% data variables.product.prodname_github_codespaces %} 预构建](/codespaces/prebuilding-your-codespaces/about-codespaces-prebuilds#about-billing-for-github-codespaces-prebuilds)”。
* 每个区域的预构建模板将产生单独的费用。 因此,您应仅为已知将使用预构建的区域启用预构建。 更多信息请参阅“[关于 {% data variables.product.prodname_github_codespaces %} 预构建](/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds#about-billing-for-codespaces-prebuilds)”。
* 开发人员可以为 {% data variables.product.prodname_codespaces %} 设置其默认区域,这样您就可以为较少的区域启用预构建。 有关详细信息,请参阅“[设置 {% data variables.product.prodname_github_codespaces %} 的默认区域](/codespaces/customizing-your-codespace/setting-your-default-region-for-github-codespaces)”。
{% endnote %}
1. 设置要保留的预构建模板版本数。 您可以输入 1 到 5 之间的任意数字。 保存版本的默认数量为 2这意味着仅保存最新的模板版本和以前的版本。
1. Optionally, set the number of prebuild template versions to be retained. 您可以输入 1 到 5 之间的任意数字。 保存版本的默认数量为 2这意味着仅保存最新的模板版本和以前的版本。
根据预构建触发器设置,预构建模板可能会随每次推送或每次开发容器配置更改而更改。 通过保留旧版本的预构建模板,可以从较旧的提交创建预构建,其开发容器配置与当前预构建模板不同。 由于保留预构建模板版本会产生相关的存储成本,因此您可以根据团队的需求选择要保留的版本数。 有关计费的更多信息,请参阅“[关于 {% data variables.product.prodname_github_codespaces %} 的计费](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#codespaces-pricing)”。
@@ -74,33 +76,27 @@ permissions: People with admin access to a repository can configure prebuilds fo
![预构建模板历史记录设置](/assets/images/help/codespaces/prebuilds-template-history-setting.png)
1. 添加用户或团队,以便在此配置的预构建工作流程运行失败时发出通知。 您可以开始键入用户名、团队名称或全名,然后在出现名称后点按该名称以将其添加到列表中。 发生预构建失败时,您添加的用户或团队将收到一封电子邮件,其中包含指向工作流程运行日志的链接,以帮助进一步调查。
1. Optionally, add users or teams to notify when the prebuild workflow run fails for this configuration. 您可以开始键入用户名、团队名称或全名,然后在出现名称后点按该名称以将其添加到列表中。 发生预构建失败时,您添加的用户或团队将收到一封电子邮件,其中包含指向工作流程运行日志的链接,以帮助进一步调查。
![预构建失败通知设置](/assets/images/help/codespaces/prebuilds-failure-notification-setting.png)
1. 单击 **Create创建**
预构建配置列在存储库设置的 {% data variables.product.prodname_codespaces %} 页面上。 {% data variables.product.prodname_actions %} 工作流程将排队,然后运行以根据您选择的分支在指定的区域中创建预构建模板。
{% data reusables.codespaces.prebuilds-permission-authorization %}
{% note %}
After you create a prebuild configuration it is listed on the {% data variables.product.prodname_codespaces %} page of your repository settings. A {% data variables.product.prodname_actions %} workflow is queued and then run to create prebuild templates in the regions you specified, based on the branch and dev container configuration file you selected.
**注意**:默认情况下,预构建配置的 {% data variables.product.prodname_actions %} 工作流程只能访问其自己的存储库中的资源。 如果您的项目使用存储库外部的资源,则需要设置 `CODESPACES_PREBUILD_TOKEN` 密钥以授予所需的访问权限。 更多信息请参阅“[允许预构建访问外部资源](/codespaces/prebuilding-your-codespaces/managing-prebuilds#allowing-a-prebuild-to-access-external-resources)”。
![Screenshot of the list of prebuild configurations](/assets/images/help/codespaces/prebuild-configs-list.png)
{% endnote %}
## 配置对不在存储库中的资源的访问
默认情况下,预构建配置的 {% data variables.product.prodname_actions %} 工作流程只能访问其自己的存储库内容。 如果项目需要访问外部资源来构建开发环境,则需要设置具有相应访问范围的个人访问令牌 (PAT)。
更多信息请参阅“[允许预构建访问外部资源](/codespaces/prebuilding-your-codespaces/managing-prebuilds#allowing-a-prebuild-to-access-external-resources)”。
For information about editing and deleting prebuild configurations, see "[Managing prebuilds](/codespaces/prebuilding-your-codespaces/managing-prebuilds)."
## 配置环境变量
要允许预构建过程访问创建开发环境所需的环境变量,您可以将这些变量设置为 {% data variables.product.prodname_codespaces %} 存储库机密或 {% data variables.product.prodname_codespaces %} 组织机密。 更多信息请参阅“[为存储库添加机密](/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces#adding-secrets-for-a-repository)”和“[为组织添加机密](/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces#adding-secrets-for-an-organization)”。
要允许预构建过程访问创建开发环境所需的环境变量,您可以将这些变量设置为 {% data variables.product.prodname_codespaces %} 存储库机密或 {% data variables.product.prodname_codespaces %} 组织机密。 更多信息请参阅“[为存储库添加机密](/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-github-codespaces#adding-secrets-for-a-repository)”和“[为组织添加机密](/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-github-codespaces#adding-secrets-for-an-organization)”。
预构建在构建环境时不使用任何用户级机密,因为在创建代码空间之前不会添加这些机密
Secrets that you create in this way will be accessible by anyone who creates a codespace from this repository. 如果您不希望这样做,也可以设置 `CODESPACES_PREBUILD_TOKEN` 密钥。 `CODESPACES_PREBUILD_TOKEN` 密钥仅用于预构建,其值在用户的代码空间中不可访问
以这种方式创建的 {% data variables.product.prodname_codespaces %} 机密将由从此存储库创建代码空间的任何人都可以访问。 如果您不希望这样做,也可以设置 `CODESPACES_PREBUILD_TOKEN` 密钥。 `CODESPACES_PREBUILD_TOKEN` 密钥仅用于预构建,其值在用户的代码空间中不可访问。 更多信息请参阅“[允许预构建访问外部资源](/codespaces/prebuilding-your-codespaces/managing-prebuilds#allowing-a-prebuild-to-access-external-resources)”。
Prebuilds cannot use any user-level secrets while building your environment, because these are not available until after the codespace has been created.
## 配置要包含在预构建中的耗时任务
@@ -110,4 +106,5 @@ permissions: People with admin access to a repository can configure prebuilds fo
## 延伸阅读
- "[Allowing a prebuild to access other repositories](/codespaces/prebuilding-your-codespaces/allowing-a-prebuild-to-access-other-repositories)"
- “[预构建疑难解答](/codespaces/troubleshooting/troubleshooting-prebuilds)”

View File

@@ -12,6 +12,7 @@ redirect_from:
children:
- /about-github-codespaces-prebuilds
- /configuring-prebuilds
- /allowing-a-prebuild-to-access-other-repositories
- /managing-prebuilds
- /testing-dev-container-changes
---

View File

@@ -56,6 +56,9 @@ miniTocMaxHeadingLevel: 3
1. 对预构建配置进行所需的更改,然后单击 **Update更新**
{% data reusables.codespaces.prebuilds-permission-authorization %}
### 禁用预构建配置
要暂停更新配置的预构建模板,可以禁用配置的工作流程运行。 为预构建配置禁用工作流程不会删除以前为该配置创建的任何预构建模板,因此,代码空间将继续从现有预构建模板生成。
@@ -91,34 +94,6 @@ miniTocMaxHeadingLevel: 3
![下拉菜单中的“手动触发”选项](/assets/images/help/codespaces/prebuilds-manually-trigger.png)
## 允许预构建访问外部资源
默认情况下,预构建配置的 {% data variables.product.prodname_actions %} 工作流程只能访问其自己的存储库内容。 您的项目可能会使用其他资源来构建开发环境例如其他存储库中的文件、包、GHCR 映像和 API。 要允许预构建安装程序访问这些资源,需要创建一个新的个人帐户,然后使用此帐户创建具有适当作用域的个人访问令牌 (PAT)。
1. 在 {% data variables.product.prodname_dotcom %} 上创建新的个人帐户。
{% warning %}
**警告**:虽然您可以使用现有的个人帐户生成 PAT但我们强烈建议您创建一个只能访问方案所需目标存储库的新帐户。 这是因为访问令牌的 `repository` 权限授予访问对帐户有权访问的所有存储库。 更多信息请参阅“[注册新的 GitHub 帐户](/get-started/signing-up-for-github/signing-up-for-a-new-github-account)”和“[ {% data variables.product.prodname_actions %} 的安全强化](/actions/security-guides/security-hardening-for-github-actions#considering-cross-repository-access)”。
{% endwarning %}
1. 向新帐户授予对所需存储库的读取访问权限。 更多信息请参阅“[管理个人对组织仓库的访问](/organizations/managing-access-to-your-organizations-repositories/managing-an-individuals-access-to-an-organization-repository)”。
1. 登录到新帐户时,创建 `repo` 范围的 PAT。 (可选)如果预构建需要从 {% data variables.product.company_short %} {% data variables.product.prodname_container_registry %} 下载包,还要选择 `read:packages` 作用域。 更多信息请参阅“[创建个人访问令牌](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)”。
![为 PAT 选择的 'repo' 和 'packages' 作用域](/assets/images/help/codespaces/prebuilds-select-scopes.png)
如果预构建将使用 {% data variables.product.company_short %} {% data variables.product.prodname_container_registry %} 中的软件包,则需要向新帐户授予对软件包的访问权限,或者将软件包配置为继承要预构建的存储库的访问权限。 更多信息请参阅“[配置包的访问控制和可见性](/packages/learn-github-packages/configuring-a-packages-access-control-and-visibility)”。
{% ifversion ghec %}1. 授权令牌与 SAML 单点登录 (SSO) 一起使用,以便它可以访问启用了 SSO 的组织所拥有的存储库。 更多信息请参阅“[授权个人访问令牌用于 SAML 单点登录](/authentication/authenticating-with-saml-single-sign-on/authorizing-a-personal-access-token-for-use-with-saml-single-sign-on)”。
![用于为 PAT 配置 SSO 的按钮](/assets/images/help/codespaces/configure-SSO-for-PAT.png)
{% endif %}
1. 复制令牌字符串。 您将此密钥分配给 {% data variables.product.prodname_codespaces %} 存储库机密。
1. 重新登录到对存储库具有管理员访问权限的帐户。
1. 在要为其创建 {% data variables.product.prodname_codespaces %} 预构建的存储库中,创建一个名为 `CODESPACES_PREBUILD_TOKEN` 的新 {% data variables.product.prodname_codespaces %} 存储库机密,为其提供您创建和复制的令牌值。 更多信息请参阅“[管理用于 {% data variables.product.prodname_github_codespaces %} 的仓库和组织的加密密钥](/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-github-codespaces#adding-secrets-for-a-repository)”。
PAT 将用于为存储库创建的所有后续预构建模板。 与其他 {% data variables.product.prodname_codespaces %} 存储库机密不同, `CODESPACES_PREBUILD_TOKEN` 机密仅用于预构建,不可用于从存储库创建的代码空间。
## 延伸阅读
- “[预构建疑难解答](/codespaces/troubleshooting/troubleshooting-prebuilds)”

View File

@@ -55,8 +55,14 @@ cat /workspaces/.codespaces/shared/environment-variables.json | jq '.ACTION_NAME
* 检查最近是否将对开发容器配置的更改推送到启用了预构建的分支。 如果是这样,通常必须等到为此推送运行的预构建工作流程完成,然后预构建才会再次可用。
* 如果最近未进行任何配置更改,请转到存储库的“ **操作** ”选项卡,单击工作流程列表中的 **{% octicon "codespaces" aria-label="The Codespaces icon" %} {% data variables.product.prodname_codespaces %} 预构建** ,然后检查分支的预构建工作流程运行是否成功。 如果工作流程的最新运行失败,并且其中一个或多个失败的运行包含对开发容器配置的更改,则关联分支将没有可用的预构建。
## Some resources cannot be accessed in codespaces created using a prebuild
If the `devcontainer.json` configuration file for a prebuild configuration specifies that permissions for access to other repositories are required, then the repository administrator is prompted to authorize these permissions when they create or update the prebuild configuration. If the administrator does not grant all of the requested permissions there's a chance that problems may occur in the prebuild, and in codespaces created from this prebuild. This is true even if the user who creates a codespace based on this prebuild _does_ grant all of the permissions when they are prompted to do so.
## 预构建工作流程运行失败疑难解答
If the `devcontainer.json` configuration file for a prebuild configuration is updated to specify that permissions for access to other repositories are required, and a repository administrator has not been prompted to authorize these permissions for the prebuild configuration, then the prebuild workflow may fail. Try updating the prebuild configuration, without making any changes. If, when you click **Update**, the authorization page is displayed, check that the requested permissions are appropriate and, if so, authorize the request. For more information, see "[Managing prebuilds](/codespaces/prebuilding-your-codespaces/managing-prebuilds#editing-a-prebuild-configuration)" and "[Managing access to other repositories within your codespace](/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces#setting-additional-repository-permissions)."
如果为预构建配置运行的工作流程失败,则可以在调查时暂时禁用预构建配置。 更多信息请参阅“[管理预构建](/codespaces/prebuilding-your-codespaces/managing-prebuilds#disabling-a-prebuild-configuration)”。
## 延伸阅读

View File

@@ -34,7 +34,7 @@ shortTitle: 管理 wiki 网页
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-wiki %}
4. 使用 wiki 侧栏,导航到您要更改的页面。 在页面的右上角,单击 **Edit编辑**。 ![Wiki 编辑页面按钮](/assets/images/help/wiki/wiki_edit_page_button.png)
5. 使用文本编辑器添加页面内容。 ![Wiki WYSIWYG](/assets/images/help/wiki/wiki_wysiwyg.png)
5. Use the text editor to edit the page's content. ![Wiki WYSIWYG](/assets/images/help/wiki/wiki_wysiwyg.png)
6. 输入提交消息,描述您的更改。 ![Wiki 提交消息](/assets/images/help/wiki/wiki_commit_message.png)
7. 要提交更改到 wiki请单击 **Save Page保存页面**

View File

@@ -34,8 +34,8 @@ shortTitle: 阻止您的帐户
- 您在他们仓库协作者的身份被删除
- 他们与您的赞助关系被取消
- 任何对被阻止用户的待处理仓库或帐户继承者邀请或来自该用户的邀请都被取消
- The user is removed as a collaborator from all the projects and {% data variables.projects.projects_v1_boards %} owned by you
- You are removed as a collaborator from all the projects and {% data variables.projects.projects_v1_boards %} owned by the user
- 用户作为协作者将从您拥有的所有项目和 {% data variables.projects.projects_v1_boards %} 中移除
- 您将作为协作者从用户拥有的所有项目和 {% data variables.projects.projects_v1_boards %} 中移除
您阻止用户后,他们无法:
- 向您发送任何通知,包括 [@提及](/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams)您的用户名
@@ -48,8 +48,8 @@ shortTitle: 阻止您的帐户
- 在评论中交叉引用您的仓库
- 复刻、关注、固定您的仓库或对其标星
- 赞助您
- Add you as a collaborator on their projects and {% data variables.projects.projects_v1_boards %}
- Make changes to your public projects and {% data variables.projects.projects_v1_boards %}
- 将您添加为他们的项目和 {% data variables.projects.projects_v1_boards %} 的协作者
- 对公共项目和 {% data variables.projects.projects_v1_boards %} 进行更改
在您拥有的仓库中,被阻止的用户也不能:
- 打开议题

View File

@@ -27,7 +27,7 @@ topics:
* 使用 [Octocat 或 GitHub 徽标](https://github.com/logos)来标识您的产品适用于 GitHub
* 在您的网站上发布有关您的集成的视频或博客
## 准备加入 GitHub 开发者计划吗?</h3>
## 准备加入 GitHub 开发者计划吗?
成员资格向满足以下条件的个人开发者和公司开放:

View File

@@ -17,5 +17,7 @@ children:
- /viewing-insights-from-your-project
- /managing-your-project
allowTitleToDifferFromFilename: true
redirect_from:
- /issues/trying-out-the-new-projects-experience
---

View File

@@ -1,6 +1,6 @@
---
title: 'Managing access to your organizations {% data variables.product.prodname_projects_v1 %}'
intro: 'As an organization owner or {% data variables.projects.projects_v1_board %} admin, you can give organization members, teams, and outside collaborators different levels of access to {% data variables.projects.projects_v1_boards %} owned by your organization.'
title: '管理对组织 {% data variables.product.prodname_projects_v1 %} 的访问'
intro: '作为组织所有者或 {% data variables.projects.projects_v1_board %} 管理员,您可以向组织成员、团队和外部协作者授予对组织拥有的 {% data variables.projects.projects_v1_boards %} 的不同级别访问权限。'
redirect_from:
- /articles/managing-access-to-your-organization-s-project-boards
- /articles/managing-access-to-your-organizations-project-boards
@@ -20,7 +20,7 @@ children:
- /managing-an-individuals-access-to-an-organization-project-board
- /adding-an-outside-collaborator-to-a-project-board-in-your-organization
- /removing-an-outside-collaborator-from-an-organization-project-board
shortTitle: 'Manage {% data variables.product.prodname_project_v1 %} access'
shortTitle: '管理 {% data variables.product.prodname_project_v1 %} 访问权限'
allowTitleToDifferFromFilename: true
---

View File

@@ -1,6 +1,6 @@
---
title: 'Managing an individuals access to an organization {% data variables.product.prodname_project_v1 %}'
intro: 'As an organization owner or {% data variables.projects.projects_v1_board %} admin, you can manage an individual member''s access to a {% data variables.projects.projects_v1_board %} owned by your organization.'
title: '管理个人对组织 {% data variables.product.prodname_project_v1 %} 的访问'
intro: '作为组织所有者或 {% data variables.projects.projects_v1_board %} 管理员,您可以管理单个成员对组织拥有的 {% data variables.projects.projects_v1_board %} 的访问。'
redirect_from:
- /articles/managing-an-individual-s-access-to-an-organization-project-board
- /articles/managing-an-individuals-access-to-an-organization-project-board
@@ -21,11 +21,11 @@ allowTitleToDifferFromFilename: true
{% note %}
**Note:** {% data reusables.project-management.cascading-permissions %} For more information, see "[{% data variables.product.prodname_project_v1_caps %} permissions for an organization](/articles/project-board-permissions-for-an-organization)."
**注意:** {% data reusables.project-management.cascading-permissions %} 更多信息请参阅“[{% data variables.product.prodname_project_v1_caps %} 组织的权限](/articles/project-board-permissions-for-an-organization)”。
{% endnote %}
## Giving an organization member access to a {% data variables.projects.projects_v1_board %}
## 授予组织成员对 {% data variables.projects.projects_v1_board %} 的访问
{% data reusables.profile.access_org %}
{% data reusables.user-settings.access_org %}
@@ -39,7 +39,7 @@ allowTitleToDifferFromFilename: true
{% data reusables.project-management.add-collaborator %}
{% data reusables.project-management.collaborator-permissions %}
## Changing an organization member's access to a {% data variables.projects.projects_v1_board %}
## 更改组织成员对 {% data variables.projects.projects_v1_board %} 的访问
{% data reusables.profile.access_org %}
{% data reusables.user-settings.access_org %}
@@ -51,9 +51,9 @@ allowTitleToDifferFromFilename: true
{% data reusables.project-management.collaborator-option %}
{% data reusables.project-management.collaborator-permissions %}
## Removing an organization member's access to a {% data variables.projects.projects_v1_board %}
## 移除组织成员对 {% data variables.projects.projects_v1_board %} 的访问权限
When you remove a collaborator from a {% data variables.projects.projects_v1_board %}, they may still retain access to the board based on the permissions they have for other roles. To completely remove access to a {% data variables.projects.projects_v1_board %}, you must remove access for each role the person has. For instance, a person may have access to the {% data variables.projects.projects_v1_board %} as an organization member or team member. For more information, see "[{% data variables.product.prodname_project_v1_caps %} permissions for an organization](/articles/project-board-permissions-for-an-organization)."
{% data variables.projects.projects_v1_board %} 删除协作者时,根据他们其他角色的权限,他们可能仍然保有对项目板的访问权限。 要完全删除个人对 {% data variables.projects.projects_v1_board %} 的访问权限,必须删除其每个角色的访问权限。 例如,某个人可能对 {% data variables.projects.projects_v1_board %} 具有组织成员或团队成员的访问权限。 For more information, see "[{% data variables.product.prodname_project_v1_caps %} permissions for an organization](/articles/project-board-permissions-for-an-organization)."
{% data reusables.profile.access_org %}
{% data reusables.user-settings.access_org %}

View File

@@ -1,6 +1,6 @@
---
title: 'Managing team access to an organization {% data variables.product.prodname_project_v1 %}'
intro: 'As an organization owner or {% data variables.projects.projects_v1_board %} admin, you can give a team access to a {% data variables.projects.projects_v1_board %} owned by your organization.'
title: '管理团队对组织 {% data variables.product.prodname_project_v1 %} 的访问'
intro: '作为组织所有者或 {% data variables.projects.projects_v1_board %} 管理员,您可以向团队授予对组织拥有的 {% data variables.projects.projects_v1_board %} 的访问权限。'
redirect_from:
- /articles/managing-team-access-to-an-organization-project-board
- /github/setting-up-and-managing-organizations-and-teams/managing-team-access-to-an-organization-project-board
@@ -21,18 +21,18 @@ allowTitleToDifferFromFilename: true
{% warning %}
**警告:**
- You can change a team's permission level if the team has direct access to a {% data variables.projects.projects_v1_board %}. If the team's access to the {% data variables.projects.projects_v1_board %} is inherited from a parent team, you must change the parent team's access to the {% data variables.projects.projects_v1_board %}.
- If you add or remove {% data variables.projects.projects_v1_board %} access for a parent team, each of that parent's child teams will also receive or lose access to the {% data variables.projects.projects_v1_board %}. 更多信息请参阅“[关于团队](/articles/about-teams)”。
- 如果团队可以直接访问 {% data variables.projects.projects_v1_board %},则可以更改该团队的权限级别。 如果团队对 {% data variables.projects.projects_v1_board %} 的访问权限继承自父团队,则必须更改父团队对 {% data variables.projects.projects_v1_board %} 的访问权限。
- 如果为父团队添加或删除 {% data variables.projects.projects_v1_board %} 访问权限,则该父团队的每个子团队也将获得或失去对 {% data variables.projects.projects_v1_board %} 的访问权限。 更多信息请参阅“[关于团队](/articles/about-teams)”。
{% endwarning %}
## Giving a team access to a {% data variables.projects.projects_v1_board %}
## 授予团队访问 {% data variables.projects.projects_v1_board %}
You can give an entire team the same permission level to a {% data variables.projects.projects_v1_board %}.
您可以为整个团队提供相同的 {% data variables.projects.projects_v1_board %} 访问权限级别。
{% note %}
**Note:** {% data reusables.project-management.cascading-permissions %} For example, if an organization owner has given a team read permissions to a {% data variables.projects.projects_v1_board %}, and a {% data variables.projects.projects_v1_board %} admin gives one of the team members admin permissions to that board as an individual collaborator, that person would have admin permissions to the {% data variables.projects.projects_v1_board %}. For more information see, "[{% data variables.product.prodname_project_v1_caps %} permissions for an organization](/articles/project-board-permissions-for-an-organization)."
**注意:** {% data reusables.project-management.cascading-permissions %} 例如,如果组织所有者授予了团队对 {% data variables.projects.projects_v1_board %} 的读取权限,而 {% data variables.projects.projects_v1_board %} 管理员将团队成员之一作为单个协作者授予对该版块的管理员权限,则该人将具有 {% data variables.projects.projects_v1_board %} 的管理员权限。 更多信息请参阅“[{% data variables.product.prodname_project_v1_caps %} 组织的权限](/articles/project-board-permissions-for-an-organization)”。
{% endnote %}
@@ -47,12 +47,12 @@ You can give an entire team the same permission level to a {% data variables.pro
9. 要添加团队,请单击 **Add a team: Select team添加团队选择团队**。 然后,从下拉菜单中选择一个团队,或者搜索要添加的团队。 ![添加包含组织中团队列表的团队下拉菜单](/assets/images/help/projects/add-a-team.png)
10. 在团队名称旁边,使用下拉菜单选择所需的权限级别:**Read读取**、**Write写入**或 **Admin管理员**。 ![包含读取、写入和管理员选项的团队权限下拉菜单](/assets/images/help/projects/org-project-team-choose-permissions.png)
## Configuring a team's access to a {% data variables.projects.projects_v1_board %}
## 配置团队对 {% data variables.projects.projects_v1_board %} 的访问权限
If a team's access to a {% data variables.projects.projects_v1_board %} is inherited from a parent team, you must change the parent team's access to the {% data variables.projects.projects_v1_board %} to update access to the child teams.
如果团队对 {% data variables.projects.projects_v1_board %} 的访问权限是从父团队继承的,则必须更改父团队对 {% data variables.projects.projects_v1_board %} 的访问权限,以更新对子团队的访问权限。
{% data reusables.profile.access_org %}
{% data reusables.user-settings.access_org %}
{% data reusables.organizations.specific_team %}
4. 在团队的对话上方,单击 {% octicon "project" aria-label="The Projects icon" %} **Projects项目**。 ![团队仓库选项卡](/assets/images/help/organizations/team-project-board-button.png)
5. To change permissions levels, to the right of the {% data variables.projects.projects_v1_board %} you want to update, use the drop-down. To remove a {% data variables.projects.projects_v1_board %}, click **{% octicon "trash" aria-label="The trash icon" %}**. ![从团队删除项目板的垃圾桶按钮](/assets/images/help/organizations/trash-button.png)
5. 若要更改权限级别,请在要更新的 {% data variables.projects.projects_v1_board %} 右侧使用下拉列表。 To remove a {% data variables.projects.projects_v1_board %}, click **{% octicon "trash" aria-label="The trash icon" %}**. ![从团队删除项目板的垃圾桶按钮](/assets/images/help/organizations/trash-button.png)

View File

@@ -1,6 +1,6 @@
---
title: 'Removing an outside collaborator from an organization {% data variables.product.prodname_project_v1 %}'
intro: 'As an organization owner or {% data variables.projects.projects_v1_board %} admin, you can remove an outside collaborator''s access to a {% data variables.projects.projects_v1_board %}.'
title: '从组织 {% data variables.product.prodname_project_v1 %} 中删除外部协作者'
intro: '作为组织所有者或 {% data variables.projects.projects_v1_board %} 管理员,您可以移除外部协作者对 {% data variables.projects.projects_v1_board %} 的访问权限。'
redirect_from:
- /articles/removing-an-outside-collaborator-from-an-organization-project-board
- /github/setting-up-and-managing-organizations-and-teams/removing-an-outside-collaborator-from-an-organization-project-board

View File

@@ -40,12 +40,12 @@ shortTitle: 管理自定义域
## 配置子域
要设置 `www` 或自定义子域,例如 `www.example.com` `blog.example.com`,您必须将域添加到仓库设置,这将在站点的仓库中创建 CNAME 文件。 然后,通过 DNS 提供商配置 CNAME 记录。
To set up a `www` or custom subdomain, such as `www.example.com` or `blog.example.com`, you must add your domain in the repository settings. 然后,通过 DNS 提供商配置 CNAME 记录。
{% data reusables.pages.navigate-site-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.pages.sidebar-pages %}
4. 在 "Custom domain自定义域"下,输入自定义域,然后单击 **Save保存**这将创建一个在发布源根目录中添加 _CNAME _ 文件的提交。 ![保存自定义域按钮](/assets/images/help/pages/save-custom-subdomain.png)
4. 在 "Custom domain自定义域"下,输入自定义域,然后单击 **Save保存**If you are publishing your site from a branch, this will create a commit that adds a `CNAME` file to the root of your source branch. If you are publishing your site with a custom {% data variables.product.prodname_actions %} workflow , no `CNAME` file is created. For more information about your publishing source, see "[Configuring a publishing source for your GitHub Pages site](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)." ![保存自定义域按钮](/assets/images/help/pages/save-custom-subdomain.png)
5. 导航到您的 DNS 提供程序并创建 `CNAME` 记录,使子域指向您站点的默认域。 例如,如果要对您的用户站点使用子域 `www.example.com`,您可以创建 `CNAME` 记录,使 `www.example.com` 指向 `<user>.github.io`。 如果要对您的组织站点使用子域 `www.anotherexample.com`,您可以创建 `CNAME` 记录,使 `www.anotherexample.com` 指向 `<organization>.github.io``CNAME` 记录应该始终指向 `<user>.github.io``<organization>.github.io`,不包括仓库名称。 {% data reusables.pages.contact-dns-provider %} {% data reusables.pages.default-domain-information %}
{% indented_data_reference reusables.pages.wildcard-dns-warning spaces=3 %}
@@ -63,14 +63,14 @@ shortTitle: 管理自定义域
## 配置 apex 域
要设置 apex 域,例如 `example.com`,您必须使用 DNS 提供程序配置 {% data variables.product.prodname_pages %} 仓库中的 _CNAME_ 文件以及至少一条 `ALIAS``ANAME` `A` 记录。
To set up an apex domain, such as `example.com`, you must configure a custom domain in your repository settings and at least one `ALIAS`, `ANAME`, or `A` record with your DNS provider.
{% data reusables.pages.www-and-apex-domain-recommendation %}更多信息请参阅“[配置子域](#configuring-a-subdomain)”。
{% data reusables.pages.navigate-site-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.pages.sidebar-pages %}
4. 在 "Custom domain自定义域"下,输入自定义域,然后单击 **Save保存**这将创建一个在发布源根目录中添加 _CNAME _ 文件的提交。 ![保存自定义域按钮](/assets/images/help/pages/save-custom-apex-domain.png)
4. 在 "Custom domain自定义域"下,输入自定义域,然后单击 **Save保存**If you are publishing your site from a branch, this will create a commit that adds a `CNAME` file to the root of your source branch. If you are publishing your site with a custom {% data variables.product.prodname_actions %} workflow , no `CNAME` file is created. For more information about your publishing source, see "[Configuring a publishing source for your GitHub Pages site](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)." ![保存自定义域按钮](/assets/images/help/pages/save-custom-apex-domain.png)
5. 导航到 DNS 提供程序并创建一个 `ALIAS``ANAME``A` 记录。 您也可以创建 `AAAA` 记录以获得 IPv6 支持。 {% data reusables.pages.contact-dns-provider %}
- 要创建 `ALIAS``ANAME` 记录,请将 apex 域指向站点的默认域。 {% data reusables.pages.default-domain-information %}
- 要创建 `A` 记录,请将 apex 域指向 {% data variables.product.prodname_pages %} 的 IP 地址。

View File

@@ -18,7 +18,9 @@ shortTitle: 排除自定义域的故障
## _CNAME_ 错误
自定义域存储在发布源的根目录下的 _CNAME_ 文件中。 您可以通过仓库设置或手动添加或更新此文件。 更多信息请参阅“[管理 {% data variables.product.prodname_pages %} 网站的自定义域](/articles/managing-a-custom-domain-for-your-github-pages-site)。
{% ifversion pages-custom-workflow %}If you are publishing from a custom {% data variables.product.prodname_actions %} workflow, any _CNAME_ file is ignored and is not required.{% endif %}
If you are publishing from a branch, custom domains are stored in a _CNAME_ file in the root of your publishing source. 您可以通过仓库设置或手动添加或更新此文件。 更多信息请参阅“[管理 {% data variables.product.prodname_pages %} 网站的自定义域](/articles/managing-a-custom-domain-for-your-github-pages-site)。
要让您的站点呈现在正确的域中,请确保您的 _CNAME_ 文件仍存在于仓库中。 例如,许多静态站点生成器会强制推送到您的仓库,这可能会覆盖在配置自定义域时添加到仓库中的 _CNAME_ 文件。 如果您在本地构建站点并将生成的文件推送到 {% data variables.product.product_name %},请确保先将添加 _CNAME_ 文件的提交拉取到本地仓库,使该文件纳入到构建中。

View File

@@ -71,15 +71,11 @@ For more information, see "[Enabling subdomain isolation](/enterprise/admin/inst
## Publishing sources for {% data variables.product.prodname_pages %} sites
The publishing source for your {% data variables.product.prodname_pages %} site is the branch and folder where the source files for your site are stored.
{% data reusables.pages.private_pages_are_public_warning %}
If the default publishing source exists in your repository, {% data variables.product.prodname_pages %} will automatically publish a site from that source. The default publishing source for user and organization sites is the root of the default branch for the repository. The default publishing source for project sites is the root of the `gh-pages` branch.
{% data reusables.pages.pages-about-publishing-source %}
If you want to keep the source files for your site in a different location, you can change the publishing source for your site. You can publish your site from any branch in the repository, either from the root of the repository on that branch, `/`, or from the `/docs` folder on that branch. For more information, see "[Configuring a publishing source for your {% data variables.product.prodname_pages %} site](/articles/configuring-a-publishing-source-for-your-github-pages-site#choosing-a-publishing-source)."
If you choose the `/docs` folder of any branch as your publishing source, {% data variables.product.prodname_pages %} will read everything to publish your site{% ifversion fpt or ghec %}, including the _CNAME_ file,{% endif %} from the `/docs` folder.{% ifversion fpt or ghec %} For example, when you edit your custom domain through the {% data variables.product.prodname_pages %} settings, the custom domain will write to `/docs/CNAME`. For more information about _CNAME_ files, see "[Managing a custom domain for your {% data variables.product.prodname_pages %} site](/articles/managing-a-custom-domain-for-your-github-pages-site)."{% endif %}
For more information, see "[Configuring a publishing source for your GitHub Pages site](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)."
{% ifversion ghec %}
## Limitations for {% data variables.product.prodname_emus %}
@@ -93,10 +89,22 @@ For more information about {% data variables.product.prodname_emus %}, see "[Abo
## Static site generators
{% data variables.product.prodname_pages %} publishes any static files that you push to your repository. You can create your own static files or use a static site generator to build your site for you. You can also customize your own build process locally or on another server. We recommend Jekyll, a static site generator with built-in support for {% data variables.product.prodname_pages %} and a simplified build process. For more information, see "[About {% data variables.product.prodname_pages %} and Jekyll](/articles/about-github-pages-and-jekyll)."
{% data variables.product.prodname_pages %} publishes any static files that you push to your repository. You can create your own static files or use a static site generator to build your site for you. You can also customize your own build process locally or on another server.
{% ifversion pages-custom-workflow %}
If you use a custom build process or a static site generator other than Jekyll, you can write a {% data variables.product.prodname_actions %} to build and publish your site. {% data variables.product.product_name %} provides starter workflows for several static site generators. For more information, see "[Configuring a publishing source for your GitHub Pages site](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)."
If you publish your site from a source branch, {% data variables.product.prodname_pages %} will use Jekyll to build your site by default. If you want to use a static site generator other than Jekyll, we recommend that you write a {% data variables.product.prodname_actions %} to build and publish your site instead. Otherwise, disable the Jekyll build process by creating an empty file called `.nojekyll` in the root of your publishing source, then follow your static site generator's instructions to build your site locally.
{% else %}
We recommend Jekyll, a static site generator with built-in support for {% data variables.product.prodname_pages %} and a simplified build process. For more information, see "[About {% data variables.product.prodname_pages %} and Jekyll](/articles/about-github-pages-and-jekyll)."
{% data variables.product.prodname_pages %} will use Jekyll to build your site by default. If you want to use a static site generator other than Jekyll, disable the Jekyll build process by creating an empty file called `.nojekyll` in the root of your publishing source, then follow your static site generator's instructions to build your site locally.
{% endif %}
{% data variables.product.prodname_pages %} does not support server-side languages such as PHP, Ruby, or Python.
## Limits on use of {% data variables.product.prodname_pages %}
@@ -117,7 +125,7 @@ In addition, your use of {% data variables.product.prodname_pages %} is subject
- Published {% data variables.product.prodname_pages %} sites may be no larger than 1 GB.
{% ifversion fpt or ghec %}
- {% data variables.product.prodname_pages %} sites have a *soft* bandwidth limit of 100 GB per month.
- {% data variables.product.prodname_pages %} sites have a *soft* limit of 10 builds per hour.
- {% data variables.product.prodname_pages %} sites have a *soft* limit of 10 builds per hour.{% ifversion pages-custom-workflow %} This limit does not apply if you build and publish your site with a custom {% data variables.product.prodname_actions %} workflow {% endif %}
If your site exceeds these usage quotas, we may not be able to serve your site, or you may receive a polite email from {% data variables.contact.contact_support %} suggesting strategies for reducing your site's impact on our servers, including putting a third-party content distribution network (CDN) in front of your site, making use of other {% data variables.product.prodname_dotcom %} features such as releases, or moving to a different hosting service that might better fit your needs.

View File

@@ -13,12 +13,21 @@ versions:
topics:
- Pages
shortTitle: 将主题添加到 Pages 站点
permissions: 'People with admin permissions for a repository can use the theme chooser to add a theme to a {% data variables.product.prodname_pages %} site.'
---
拥有仓库管理员权限的人可以使用主题选择器向 {% data variables.product.prodname_pages %} 站点添加主题。
## 关于主题选择器
{% ifversion pages-custom-workflow %}
{% note %}
**Note**: The Jekyll theme chooser is not supported for {% data variables.product.prodname_pages %} sites that are published with a custom {% data variables.product.prodname_actions %} workflow. If you build your site with Jekyll and publish your site with a custom {% data variables.product.prodname_actions %} workflow, you can add a theme by editing the `_config.yml` file. For more information, see "[Adding a theme to your GitHub Pages site using Jekyll](/pages/setting-up-a-github-pages-site-with-jekyll/adding-a-theme-to-your-github-pages-site-using-jekyll)."
{% endnote %}
{% endif %}
主题选择器可用于向仓库添加 Jekyll 主题。 有关 Jekyll 的更多信息,请参阅“[关于 {% data variables.product.prodname_pages %} 和 Jekyll](/articles/about-github-pages-and-jekyll)”。
主题选择器如何工作取决于您的资源库是公共的还是私有的。

View File

@@ -1,6 +1,6 @@
---
title: 配置 GitHub Pages 站点的发布源
intro: '如果您使用 {% data variables.product.prodname_pages %} 站点的默认发布源,您的站点将自动发布。 您也可以选择从不同的分支或文件夹发布您的站点。'
intro: '{% ifversion pages-custom-workflow %}You can configure your {% data variables.product.prodname_pages %} site to publish when changes are pushed to a specific branch, or you can write a {% data variables.product.prodname_actions %} workflow to publish your site.{% else%}If you use the default publishing source for your {% data variables.product.prodname_pages %} site, your site will publish automatically. You can also choose to publish your site from a different branch or folder.{% endif %}'
redirect_from:
- /articles/configuring-a-publishing-source-for-github-pages
- /articles/configuring-a-publishing-source-for-your-github-pages-site
@@ -17,20 +17,30 @@ topics:
shortTitle: 配置发布源
---
有关发布源的更多信息,请参阅“[关于 {% data variables.product.prodname_pages %}](/articles/about-github-pages#publishing-sources-for-github-pages-sites)”。
## About publishing sources
## 选择发布源
{% data reusables.pages.pages-about-publishing-source %}
在配置发布源之前,请确保您要用作发布源的分支已经存在于您的仓库中。
{% data reusables.pages.private_pages_are_public_warning %}
## Publishing from a branch
1. Make sure the branch you want to use as your publishing source already exists in your repository.
{% data reusables.pages.navigate-site-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.pages.sidebar-pages %}
{% ifversion pages-custom-workflow %}
1. Under "Build and deployment", under "Source", select **Deploy from a branch**.
1. Under "Build and deployment", under "Branch", use the **None** or **Branch** drop-down menu and select a publishing source.
![用于选择发布源的下拉菜单](/assets/images/help/pages/publishing-source-drop-down.png)
{% else %}
3. 在“{% data variables.product.prodname_pages %}”下,使用 **None**或 **Branch分支**下拉菜单选择发布源。 ![用于选择发布源的下拉菜单](/assets/images/help/pages/publishing-source-drop-down.png)
{% endif %}
4. (可选)使用下拉菜单选择发布源的文件夹。 ![用于选择发布源文件夹的下拉菜单](/assets/images/help/pages/publishing-source-folder-drop-down.png)
5. 单击 **Save保存**。 ![用于保存对发布源设置的更改的按钮](/assets/images/help/pages/publishing-source-save.png)
## {% data variables.product.prodname_pages %} 站点发布问题疑难排解
### Troubleshooting publishing from a branch
{% data reusables.pages.admin-must-push %}
@@ -49,3 +59,45 @@ shortTitle: 配置发布源
{% endnote %}
{% endif %}
{% ifversion pages-custom-workflow %}
## Publishing with a custom {% data variables.product.prodname_actions %} workflow
{% data reusables.pages.pages-custom-workflow-beta %}
To configure your site to publish with {% data variables.product.prodname_actions %}:
{% data reusables.pages.navigate-site-repo %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.pages.sidebar-pages %}
1. Under "Build and deployment", under "Source", select **GitHub Actions**.
1. {% data variables.product.product_name %} will suggest several starter workflows. If you already have a workflow to publish your site, you can skip this step. Otherwise, choose one of the options to create a {% data variables.product.prodname_actions %} workflow. For more information about creating your custom workflow, see "[Creating a custom {% data variables.product.prodname_actions %} workflow to publish your site](#creating-a-custom-github-actions-workflow-to-publish-your-site)."
{% data variables.product.prodname_pages %} does not associate a specific workflow to the {% data variables.product.prodname_pages %} settings. However, the {% data variables.product.prodname_pages %} settings will link to the workflow run that most recently deployed your site.
### Creating a custom {% data variables.product.prodname_actions %} workflow to publish your site
For more information about {% data variables.product.prodname_actions %}, see "[Actions](/actions)."
When you configure your site to publish with {% data variables.product.prodname_actions %}, {% data variables.product.product_name %} will suggest starter workflows for common publishing scenarios. The general flow of a workflow is to:
1. Trigger whenever there is a push to the default branch of the repository or whenever a pull request that targets the default branch is opened, reopened, or updated.
1. Use the [`actions/checkout`](https://github.com/actions/checkout) action to check out the repository contents.
1. If required by your site, build any static site files.
1. Use the [`actions/upload-pages-artifact`](https://github.com/actions/upload-pages-artifact) action to upload the static files as an artifact.
1. If the workflow was triggered by a push to the default branch, use the [`actions/deploy-pages`](https://github.com/actions/deploy-pages) action to deploy the artifact. This step is skipped if the workflow was triggered by a pull request.
The starter workflows use a deployment environment called `github-pages`. If your repository does not already include an environment called `github-pages`, the environment will be created automatically. We recommend that you add an environment protection rule so that only the default branch can deploy to this environment. 更多信息请参阅“[使用环境进行部署](/actions/deployment/targeting-different-environments/using-environments-for-deployment)”。
{% note %}
**Note**: A `CNAME` file in your repository file does not automatically add or remove a custom domain. Instead, you must configure the custom domain through your repository settings or through the API. For more information, see "[Managing a custom domain for your GitHub Pages site](/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#configuring-a-subdomain)" and the [Pages API reference documentation](/rest/pages#update-information-about-a-github-pages-site).
{% endnote %}
### Troubleshooting publishing with a custom {% data variables.product.prodname_actions %} workflow
For information about how to troubleshoot your {% data variables.product.prodname_actions %} workflow, see "[About monitoring and troubleshooting](/actions/monitoring-and-troubleshooting-workflows/about-monitoring-and-troubleshooting)."
{% endif %}

View File

@@ -41,14 +41,11 @@ shortTitle: 创建 GitHub Pages 站点
{% data reusables.pages.navigate-site-repo %}
{% data reusables.pages.decide-publishing-source %}
3. 如果所选发布源已存在,请导航到发布源。 如果所选发布源不存在,则创建发布源。
4. 在发布源的根目录中,创建一个名为 `index.md`、包含要在网站主页上显示的内容的文件。
1. Create the entry file for your site. {% data variables.product.prodname_pages %} will look for an `index.html`, `index.md`, or `README.md` file as the entry file for your site.
{% tip %}
{% ifversion pages-custom-workflow %}If your publishing source is a branch and folder, the entry file must be at the top level of the source folder on the source branch. For example, if your publishing source is the `/docs` folder on the `main` branch, your entry file must be located in the `/docs` folder on a branch called `main`.
**提示:** 如果存在 `index.html`,则将使用它而不是 `index.md`。 如果没有 `index.html``index.md`,将使用 `README.md`
{% endtip %}
If your publishing source is a {% data variables.product.prodname_actions %} workflow, the artifact that you deploy must include the entry file at the top level of the artifact. Instead of adding the entry file to your repository, you may choose to have your {% data variables.product.prodname_actions %} workflow generate your entry file when the workflow runs.{% else %} The entry file must be at the top level of your chosen publishing source. For example, if your publishing source is the `/docs` folder on the `main` branch, your entry file must be located in the `/docs` folder on a branch called `main`.{% endif %}
{% data reusables.pages.configure-publishing-source %}
{% data reusables.repositories.sidebar-settings %}
{% data reusables.pages.sidebar-pages %}

View File

@@ -20,6 +20,18 @@ topics:
shortTitle: 取消发布 Pages 站点
---
{% ifversion pages-custom-workflow %}
When you unpublish your site, the site will no longer be available. Any existing repository settings or content will not be affected.
{% data reusables.repositories.navigate-to-repo %}
1. Under **{% data variables.product.prodname_pages %}**, next to the **Your site is live at** message, click {% octicon "kebab-horizontal" aria-label="the horizontal kebab icon" %}.
1. In the menu that appears, select **Unpublish site**.
![Drop down menu to unpublish site](/assets/images/help/pages/unpublish-site.png)
{% else %}
## 取消发布项目站点
{% data reusables.repositories.navigate-to-repo %}
@@ -35,3 +47,5 @@ shortTitle: 取消发布 Pages 站点
{% data reusables.repositories.navigate-to-repo %}
2. 删除用作发布源的分支,或删除整个仓库。 更多信息请参阅“[在仓库中创建和删除分支](/articles/creating-and-deleting-branches-within-your-repository#deleting-a-branch)”和“[删除仓库](/articles/deleting-a-repository)”。
{% data reusables.pages.update_your_dns_settings %}
{% endif %}

View File

@@ -19,7 +19,7 @@ shortTitle: Jekyll build errors for Pages
## About Jekyll build errors
Sometimes, {% data variables.product.prodname_pages %} will not attempt to build your site after you push changes to your site's publishing source.{% ifversion fpt or ghec %}
{% ifversion pages-custom-workflow %}If you are publishing from a branch, sometimes{% else %}Sometimes,{% endif %} {% data variables.product.prodname_pages %} will not attempt to build your site after you push changes to your site's publishing source.{% ifversion fpt or ghec %}
- The person who pushed the changes hasn't verified their email address. For more information, see "[Verifying your email address](/articles/verifying-your-email-address)."{% endif %}
- You're pushing with a deploy key. If you want to automate pushes to your site's repository, you can set up a machine user instead. For more information, see "[Managing deploy keys](/developers/overview/managing-deploy-keys#machine-users)."
- You're using a CI service that isn't configured to build your publishing source. For example, Travis CI won't build the `gh-pages` branch unless you add the branch to a safe list. For more information, see "[Customizing the build](https://docs.travis-ci.com/user/customizing-the-build/#safelisting-or-blocklisting-branches)" on Travis CI, or your CI service's documentation.
@@ -57,11 +57,15 @@ We recommend testing your site locally, which allows you to see build error mess
## Viewing Jekyll build error messages in your pull request
When you create a pull request to update your publishing source on {% data variables.product.product_name %}, you can see build error messages on the **Checks** tab of the pull request. For more information, see "[About status checks](/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks)."
{% ifversion pages-custom-workflow %}If you are publishing from a branch, when{% else %}When{% endif %} you create a pull request to update your publishing source on {% data variables.product.product_name %}, you can see build error messages on the **Checks** tab of the pull request. For more information, see "[About status checks](/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks)."
{% ifversion pages-custom-workflow %}If you are publishing with a custom {% data variables.product.prodname_actions %} workflow, in order to see build error messages in your pull request, you must configure your workflow to run on the `pull_request` trigger. When you do this, we recommend that you skip any deploy steps if the workflow was triggered by the `pull_request` event. This will allow you to see any build errors without deploying the changes from your pull request to your site. For more information, see "[Events that trigger workflows](/actions/using-workflows/events-that-trigger-workflows#pull_request)" and "[Expressions](/actions/learn-github-actions/expressions)."{% endif %}
## Viewing Jekyll build errors by email
When you push changes to your publishing source on {% data variables.product.product_name %}, {% data variables.product.prodname_pages %} will attempt to build your site. If the build fails, you'll receive an email at your primary email address. You'll also receive emails for build warnings. {% data reusables.pages.build-failure-email-server %}
{% ifversion pages-custom-workflow %}If you are publishing from a branch, when{% else %}When{% endif %} you push changes to your publishing source on {% data variables.product.product_name %}, {% data variables.product.prodname_pages %} will attempt to build your site. If the build fails, you'll receive an email at your primary email address. You'll also receive emails for build warnings. {% data reusables.pages.build-failure-email-server %}
{% ifversion pages-custom-workflow %}If you are publishing with a custom {% data variables.product.prodname_actions %} workflow, in order to receive emails about build errors in your pull request, you must configure your workflow to run on the `pull_request` trigger. When you do this, we recommend that you skip any deploy steps if the workflow was triggered by the `pull_request` event. This will allow you to see any build errors without deploying the changes from your pull request to your site. For more information, see "[Events that trigger workflows](/actions/using-workflows/events-that-trigger-workflows#pull_request)" and "[Expressions](/actions/learn-github-actions/expressions)."{% endif %}
## Viewing Jekyll build error messages in your pull request with a third-party CI service

View File

@@ -43,12 +43,12 @@ If Jekyll encounters an error building your {% data variables.product.prodname_p
If you received a generic error message, check for common issues.
- You're using unsupported plugins. For more information, see "[About {% data variables.product.prodname_pages %} and Jekyll](/articles/about-github-pages-and-jekyll#plugins)."{% ifversion fpt or ghec %}
- Your repository has exceeded our repository size limits. For more information, see "[What is my disk quota?](/articles/what-is-my-disk-quota)"{% endif %}
- You changed the `source` setting in your *_config.yml* file. {% data variables.product.prodname_pages %} overrides this setting during the build process.
- A filename in your publishing source contains a colon (`:`) which is not supported.
- You changed the `source` setting in your *_config.yml* file. {% ifversion pages-custom-workflow %}If you publish your site from a branch, {% endif %}{% data variables.product.prodname_pages %} overrides this setting during the build process.
- A filename in your published files contains a colon (`:`) which is not supported.
If you received a specific error message, review the troubleshooting information for the error message below.
After you've fixed any errors, push the changes to your site's publishing source to trigger another build on {% data variables.product.product_name %}.
{% ifversion pages-custom-workflow %}After you've fixed any errors, trigger another build by pushing the changes to your site's source branch (if you are publishing from a branch) or by triggering your custom {% data variables.product.prodname_actions %} workflow (if you are publishing with {% data variables.product.prodname_actions %}).{% else %}After you've fixed any errors, push the changes to your site's publishing source to trigger another build on {% data variables.product.product_name %}.{% endif %}
## Config file error
@@ -74,7 +74,7 @@ This error means that your code references a file that doesn't exist in your *_i
## File is a symlink
This error means that your code references a symlinked file that does not exist in the publishing source for your site.
This error means that your code references a symlinked file that does not exist in the published files for your site.
{% data reusables.pages.search-for-includes %} If any of the files you've referenced are symlinked, copy or move the files into the *_includes* directory.
@@ -162,9 +162,9 @@ To troubleshoot, remove the `relative_permalinks` line from your *_config.yml* f
## Symlink does not exist within your site's repository
This error means that your site includes a symbolic link (symlink) that does not exist in the publishing source for your site. For more information about symlinks, see "[Symbolic link](https://en.wikipedia.org/wiki/Symbolic_link)" on Wikipedia.
This error means that your site includes a symbolic link (symlink) that does not exist in the published files for your site. For more information about symlinks, see "[Symbolic link](https://en.wikipedia.org/wiki/Symbolic_link)" on Wikipedia.
To troubleshoot, determine if the file in the error message is used to build your site. If not, or if you don't want the file to be a symlink, delete the file. If the symlinked file is necessary to build your site, make sure the file or directory the symlink references is in the publishing source for your site. To include external assets, consider using {% ifversion fpt or ghec %}`git submodule` or {% endif %}a third-party package manager such as [Bower](https://bower.io/).{% ifversion fpt or ghec %} For more information, see "[Using submodules with {% data variables.product.prodname_pages %}](/articles/using-submodules-with-github-pages)."{% endif %}
To troubleshoot, determine if the file in the error message is used to build your site. If not, or if you don't want the file to be a symlink, delete the file. If the symlinked file is necessary to build your site, make sure the file or directory the symlink references is in the published files for your site. To include external assets, consider using {% ifversion fpt or ghec %}`git submodule` or {% endif %}a third-party package manager such as [Bower](https://bower.io/).{% ifversion fpt or ghec %} For more information, see "[Using submodules with {% data variables.product.prodname_pages %}](/articles/using-submodules-with-github-pages)."{% endif %}
## Syntax error in 'for' loop

View File

@@ -17,7 +17,7 @@ topics:
---
People with admin or owner permissions can set up a CODEOWNERS file in a repository.
The people you choose as code owners must have read permissions for the repository. When the code owner is a team, that team must be visible and it must have write permissions, even if all the individual members of the team already have write permissions directly, through organization membership, or through another team membership.
The people you choose as code owners must have write permissions for the repository. When the code owner is a team, that team must be visible and it must have write permissions, even if all the individual members of the team already have write permissions directly, through organization membership, or through another team membership.
## About code owners
@@ -47,7 +47,7 @@ To reduce the size of your CODEOWNERS file, consider using wildcard patterns to
## CODEOWNERS syntax
A CODEOWNERS file uses a pattern that follows most of the same rules used in [gitignore](https://git-scm.com/docs/gitignore#_pattern_format) files, with [some exceptions](#syntax-exceptions). The pattern is followed by one or more {% data variables.product.prodname_dotcom %} usernames or team names using the standard `@username` or `@org/team-name` format. Users must have `read` access to the repository and teams must have explicit `write` access, even if the team's members already have access.
A CODEOWNERS file uses a pattern that follows most of the same rules used in [gitignore](https://git-scm.com/docs/gitignore#_pattern_format) files, with [some exceptions](#syntax-exceptions). The pattern is followed by one or more {% data variables.product.prodname_dotcom %} usernames or team names using the standard `@username` or `@org/team-name` format. Users and teams must have explicit `write` access to the repository, even if the team's members already have access.
{% ifversion fpt or ghec%}In most cases, you{% else %}You{% endif %} can also refer to a user by an email address that has been added to their account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}, for example `user@example.com`. {% ifversion fpt or ghec %} You cannot use an email address to refer to a {% data variables.product.prodname_managed_user %}. For more information about {% data variables.product.prodname_managed_users %}, see "[About {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/identity-and-access-management/managing-iam-with-enterprise-managed-users/about-enterprise-managed-users){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %}{% endif %}

View File

@@ -13,4 +13,4 @@ versions:
## 关于缓存 API
{% data variables.product.prodname_actions %} 缓存 API 允许您查询和管理存储库的 {% data variables.product.prodname_actions %} 缓存。 更多信息请参阅“[缓存依赖项以加快工作流程](/actions/advanced-guides/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy)”。
{% data variables.product.prodname_actions %} 缓存 API 允许您查询和管理存储库的 {% data variables.product.prodname_actions %} 缓存。 {% ifversion actions-cache-management %}You can also install a {% data variables.product.prodname_cli %} extension to manage your caches from the command line. {% endif %}For more information, see "[Caching dependencies to speed up workflows](/actions/advanced-guides/caching-dependencies-to-speed-up-workflows#managing-caches)."

View File

@@ -0,0 +1,5 @@
#Issue 7066
#Publishing Pages via custom Actions workflow
versions:
fpt: '*'
ghec: '*'

View File

@@ -0,0 +1,3 @@
默认情况下,每次创建或更新预构建模板或推送到启用了预构建的分支时,都会触发 {% data variables.product.prodname_actions %} 工作流程。 与其他工作流程一样,在预构建工作流程运行时,它们将消耗帐户中包含的一些操作分钟数(如果有),或者产生操作分钟数的费用。 有关操作分钟数定价的详细信息,请参阅[关于 {% data variables.product.prodname_actions %} 计费](/billing/managing-billing-for-github-actions/about-billing-for-github-actions)”。
除了 {% data variables.product.prodname_actions %} 分钟数外,您还需要为存储与给定存储库和区域的每个预构建配置关联的预构建模板付费。 预构建模板的存储按与代码空间存储相同的费率计费。

View File

@@ -0,0 +1,3 @@
若要减少操作分钟数的消耗,可以将预构建模板设置为仅在对开发容器配置文件进行更改时更新,或仅按自定义计划进行更新。 您还可以通过调整要为预构建配置保留的模板版本数来管理存储使用情况。 更多信息请参阅“[配置预构建](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-a-prebuild)”。
如果您是组织所有者,则可以通过下载组织的 {% data variables.product.prodname_actions %} 使用情况报告来跟踪预构建工作流程和存储的使用情况。 You can identify workflow runs for prebuilds by filtering the CSV output to only include the workflow called "Create {% data variables.product.prodname_codespaces %} Prebuilds." 更多信息请参阅“[查看 {% data variables.product.prodname_actions %} 使用情况](/billing/managing-billing-for-github-actions/viewing-your-github-actions-usage#viewing-github-actions-usage-for-your-organization)”。

View File

@@ -1,7 +0,0 @@
默认情况下,每次创建或更新预构建模板或推送到启用了预构建的分支时,都会触发 {% data variables.product.prodname_actions %} 工作流程。 与其他工作流程一样,在预构建工作流程运行时,它们将消耗帐户中包含的一些操作分钟数(如果有),或者产生操作分钟数的费用。 有关操作分钟数定价的详细信息,请参阅[关于 {% data variables.product.prodname_actions %} 计费](/billing/managing-billing-for-github-actions/about-billing-for-github-actions)”。
除了 {% data variables.product.prodname_actions %} 分钟数外,您还需要为存储与给定存储库和区域的每个预构建配置关联的预构建模板付费。 预构建模板的存储按与代码空间存储相同的费率计费。 更多信息请参阅[计算存储使用](#calculating-storage-usage)”。
若要减少操作分钟数的消耗,可以将预构建模板设置为仅在对开发容器配置文件进行更改时更新,或仅按自定义计划进行更新。 您还可以通过调整要为预构建配置保留的模板版本数来管理存储使用情况。 更多信息请参阅“[配置预构建](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-a-prebuild)”。
如果您是组织所有者,则可以通过下载组织的 {% data variables.product.prodname_actions %} 使用情况报告来跟踪预构建工作流程和存储的使用情况。 您可以通过筛选 CSV 输出以仅包含名为“创建预构建代码空间”的工作流程来标识预构建的工作流程运行。 更多信息请参阅“[查看 {% data variables.product.prodname_actions %} 使用情况](/billing/managing-billing-for-github-actions/viewing-your-github-actions-usage#viewing-github-actions-usage-for-your-organization)”。

View File

@@ -1 +0,0 @@
如果在创建代码空间时选择使用 `.devcontainer/SUBDIRECTORY` 位置的 `devcontainer.json` 文件,则预构建不可用。 有关选择 `devcontainer.json` 文件的信息,请参阅“[创建代码空间](/codespaces/developing-in-codespaces/creating-a-codespace#creating-a-codespace)”。

View File

@@ -0,0 +1,13 @@
If the dev container configuration for the repository specifies permissions for accessing other repositories, you will be shown an authorization page. For more information on how this is specified in the `devcontainer.json` file, see "[Managing access to other repositories within your codespace](/codespaces/managing-your-codespaces/managing-repository-access-for-your-codespaces)."
Click {% octicon "chevron-down" aria-label="The expand down icon" %} to view the details of the requested permissions.
![Screenshot of the authorization page for prebuilds](/assets/images/help/codespaces/prebuild-authorization-page.png)
Click **Authorize and continue** to grant these permissions for creation of the prebuild. Alternatively, you can click **Continue without authorizing** but, if you do so, codespaces created from the resulting prebuild may not work properly.
{% note %}
**Note**: Users who create codespaces using this prebuild will also be asked to grant these permisssions.
{% endnote %}

View File

@@ -1,5 +1,5 @@
{% note %}
**注意:** 安全管理员角色处于公开测试阶段,可能会发生更改。{% ifversion fpt %} 此功能不适用于使用旧版每个存储库计费计划的组织。{% endif %}
**Note:** The security manager role is in public beta and subject to change.
{% endnote %}

View File

@@ -1,5 +1,5 @@
{% tip %}
**注意**:如果您的网站尚未自动发布,请确保具有管理员权限和经过验证的电子邮件地址的人员已推送到发布源。
**Note**: {% ifversion pages-custom-workflow %}If you are publishing from a branch and{% else %}If{% endif %} your site has not published automatically, make sure someone with admin permissions and a verified email address has pushed to the publishing source.
{% endtip %}

View File

@@ -1,5 +1,5 @@
{% ifversion fpt %}
1. If your {% data variables.product.prodname_pages %} site is built from a public repository, it is built and deployed with a {% data variables.product.prodname_actions %} workflow run unless you've configured your {% data variables.product.prodname_pages %} site to use a different CI tool. For more information about how to view the workflow status, see "[Viewing workflow run history](/actions/monitoring-and-troubleshooting-workflows/viewing-workflow-run-history)."
{% ifversion fpt %}
1. Unless your {% data variables.product.prodname_pages %} site is built from a private or internal repository and published from a branch, your site is built and deployed with a {% data variables.product.prodname_actions %} workflow. 有关如何查看工作流程状态的详细信息,请参阅“[查看工作流程运行历史记录](/actions/monitoring-and-troubleshooting-workflows/viewing-workflow-run-history)”。
{% note %}

View File

@@ -1 +1 @@
1. 配置发布源。 更多信息请参阅“[配置 {% data variables.product.prodname_pages %} 站点的发布来源](/articles/configuring-a-publishing-source-for-your-github-pages-site#choosing-a-publishing-source)”。
1. 配置发布源。 更多信息请参阅“[配置 {% data variables.product.prodname_pages %} 站点的发布来源](/articles/configuring-a-publishing-source-for-your-github-pages-site)”。

View File

@@ -1 +1 @@
1. 确定要使用的发布源。 更多信息请参阅“[关于 {% data variables.product.prodname_pages %}](/articles/about-github-pages#publishing-sources-for-github-pages-sites)”。
1. 确定要使用的发布源。 For more information, see "[Configuring a publishing source for your GitHub Pages site](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)."

View File

@@ -1 +1 @@
1. 导航到站点的发布来源。 有关发布源的更多信息,请参阅“[关于 {% data variables.product.prodname_pages %}](/articles/about-github-pages#publishing-sources-for-github-pages-sites)”。
1. 导航到站点的发布来源。 For more information, see "[Configuring a publishing source for your GitHub Pages site](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)."

View File

@@ -1,4 +1,6 @@
如果站点是一个独立的项目,您可以创建新仓库来存储站点源代码。 如果站点与现有项目相关联,则可以在默认分支或其他分支上 `/docs` 文件夹中将源代码添加到该项目的存储库。 例如,如果您创建站点来发布已经在 {% data variables.product.product_name %} 上的项目文档, 您可能想要将站点的源代码存储在与项目相同的仓库中。
You can either create a repository or choose an existing repository for your site.
If you want to create a {% data variables.product.prodname_pages %} site for a repository where not all of the files in the repository are related to the site, you will be able to configure a publishing source for your site. For example, you can have a dedicated branch and folder to hold your site source files{% ifversion pages-custom-workflow %}, or you can use a custom {% data variables.product.prodname_actions %} workflow to build and deploy your site source files{% endif %}.
{% ifversion fpt or ghec %}如果拥有仓库的帐户使用组织的 {% data variables.product.prodname_free_user %} 或 {% data variables.product.prodname_free_team %},仓库必须是公共的。{% endif %}

View File

@@ -0,0 +1 @@
You can specify which branch and folder to use as your publishing source. The source branch can be any branch in your repository, and the source folder can either be the root of the repository (`/`) on the source branch or a `/docs` folder on the source branch. Whenever changes are pushed to the source branch, the changes in the source folder will be published to your {% data variables.product.prodname_pages %} site.

View File

@@ -0,0 +1,13 @@
{% ifversion pages-custom-workflow %}
You can publish your site when changes are pushed to a specific branch, or you can write a {% data variables.product.prodname_actions %} workflow to publish your site.
If you do not need any control over the build process for your site, we recommend that you publish your site when changes are pushed to a specific branch. {% data reusables.pages.pages-about-branch-source %}
If you want to use a build process other than Jekyll or you do not want a dedicated branch to hold your compiled static files, we recommend that you write a {% data variables.product.prodname_actions %} workflow to publish your site. {% data variables.product.product_name %} provides starter workflows for common publishing scenarios to help you write your workflow.
{% else %}
Your {% data variables.product.prodname_pages %} site will publish whenever changes are pushed to a specific branch. {% data reusables.pages.pages-about-branch-source %}
{% endif %}

View File

@@ -0,0 +1,9 @@
{% ifversion pages-custom-workflow %}
{% note %}
Note: Publishing your {% data variables.product.prodname_pages %} site with a custom {% data variables.product.prodname_actions %} workflow is in beta and subject to change.
{% endnote %}
{% endif %}

View File

@@ -1 +1 @@
当更改合并到站点的发布源时,对站点的更改将自动发布。 如果想先预览您的更改,可以在本地而不是 {% data variables.product.product_name %} 上进行更改。 然后在本地测试站点。 更多信息请参阅“[使用 Jekyll 在本地测试 {% data variables.product.prodname_pages %} 站点](/articles/testing-your-github-pages-site-locally-with-jekyll)”。
{% ifversion pages-custom-workflow %}If you are publishing from a branch, changes{% else %}Changes{% endif %} to your site are published automatically when the changes are merged into your site's publishing source. {% ifversion pages-custom-workflow %}If you are publishing from a custom {% data variables.product.prodname_actions %} workflow, changes are published whenever your workflow is triggered (typically by a push to the default branch). {% endif %}If you want to preview your changes first, you can make the changes locally instead of on {% data variables.product.product_name %}. 然后在本地测试站点。 更多信息请参阅“[使用 Jekyll 在本地测试 {% data variables.product.prodname_pages %} 站点](/articles/testing-your-github-pages-site-locally-with-jekyll)”。