Skip to content

Commit dda69e4

Browse files
authored
ci: deploy from main (#23084)
PR that changes the deploy workflow of the docs. ## What has changed? This PR simplifies the deployment flow by deleting our staging build. We publish what is on the main branch instead of relying on the `publish` and `publish-update` branches.
1 parent 3ea0b58 commit dda69e4

File tree

2 files changed

+6
-50
lines changed

2 files changed

+6
-50
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: deploy
2-
2+
# Deploys the Docker Docs website when merging to the `main` branch.
33
concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}
55
cancel-in-progress: true
@@ -8,9 +8,8 @@ on:
88
workflow_dispatch:
99
push:
1010
branches:
11-
- lab
1211
- main
13-
- published
12+
- lab
1413

1514
env:
1615
# Use edge release of buildx (latest RC, fallback to latest stable)
@@ -22,6 +21,8 @@ permissions:
2221
id-token: write
2322
contents: read
2423

24+
# The `main` branch is deployed to the production environment.
25+
# The `lab` branch is deployed to a separate environment for testing purposes.
2526
jobs:
2627
publish:
2728
runs-on: ubuntu-24.04
@@ -30,26 +31,16 @@ jobs:
3031
-
3132
name: Prepare
3233
run: |
33-
HUGO_ENV=development
3434
DOCS_AWS_REGION=us-east-1
35+
HUGO_ENV=production
3536
if [ "${{ github.ref }}" = "refs/heads/main" ]; then
36-
HUGO_ENV=staging
37-
DOCS_URL="https://docs-stage.docker.com"
38-
DOCS_AWS_IAM_ROLE="arn:aws:iam::710015040892:role/stage-docs-docs.docker.com-20220818202135984800000001"
39-
DOCS_S3_BUCKET="stage-docs-docs.docker.com"
40-
DOCS_S3_CONFIG="s3-config.json"
41-
DOCS_CLOUDFRONT_ID="E1R7CSW3F0X4H8"
42-
DOCS_LAMBDA_FUNCTION_REDIRECTS="DockerDocsRedirectFunction-stage"
43-
DOCS_SLACK_MSG="Successfully deployed docs-stage from main branch. $DOCS_URL"
44-
elif [ "${{ github.ref }}" = "refs/heads/published" ]; then
45-
HUGO_ENV=production
4637
DOCS_URL="https://docs.docker.com"
4738
DOCS_AWS_IAM_ROLE="arn:aws:iam::710015040892:role/prod-docs-docs.docker.com-20220818202218674300000001"
4839
DOCS_S3_BUCKET="prod-docs-docs.docker.com"
4940
DOCS_S3_CONFIG="s3-config.json"
5041
DOCS_CLOUDFRONT_ID="E228TTN20HNU8F"
5142
DOCS_LAMBDA_FUNCTION_REDIRECTS="DockerDocsRedirectFunction-prod"
52-
DOCS_SLACK_MSG="Successfully deployed docs from published branch. $DOCS_URL"
43+
DOCS_SLACK_MSG="Successfully deployed docs from the main branch. $DOCS_URL"
5344
elif [ "${{ github.ref }}" = "refs/heads/lab" ]; then
5445
HUGO_ENV=lab
5546
DOCS_URL="https://docs-labs.docker.com"

.github/workflows/merge.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)