環境は、一般的なデプロイ ターゲットを記述するために使用されます (例: production
、staging
、または development
)。 GitHub Actions ワークフローが環境にデプロイされると、その環境がリポジトリのメイン ページに表示されます。 環境を使って、ジョブを進めるために承認を必要とすること、ワークフローをトリガーできるブランチを制限すること、カスタム デプロイ保護規則でデプロイを制限すること、またはシークレットへのアクセスを制限することができます。 環境の作成の詳細については、「デプロイに環境の使用」を参照してください。
Each job in a workflow can reference a single environment. Any protection rules configured for the environment must pass before a job referencing the environment is sent to a runner. The job can access the environment's secrets only after the job is sent to a runner.
When a workflow references an environment, the environment will appear in the repository's deployments. For more information about viewing current and previous deployments, see デプロイ履歴の表示.