From 8addc4e462b2e0df79e8fafee3f72c525feedfdd Mon Sep 17 00:00:00 2001 From: Jennings Anderson Date: Mon, 2 Feb 2026 09:05:46 -0800 Subject: [PATCH 1/5] Create staging_deploy.yaml --- .github/workflows/staging_deploy.yaml | 74 +++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 .github/workflows/staging_deploy.yaml diff --git a/.github/workflows/staging_deploy.yaml b/.github/workflows/staging_deploy.yaml new file mode 100644 index 00000000..a37a92fc --- /dev/null +++ b/.github/workflows/staging_deploy.yaml @@ -0,0 +1,74 @@ +--- +name: Staging Deploy +run-name: Publish docs to staging website (for PR) + +on: + pull_request: + + # Allow running from the actions tab + workflow_dispatch: + inputs: + schema_branch: + description: 'Schema branch to pull from for /reference' + required: true + default: 'main' + +permissions: + id-token: write + contents: read + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Check out the main docs repo repository and build. + uses: actions/checkout@v4 + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Install NPM dependencies + run: npm install --prefer-dedupe + + - name: Build Docusaurus website + env: + DOCUSAURUS_URL: https://staging.overturemaps.org/ + DOCUSAURUS_BASE_URL: /${{ github.event.repository.name }}/pr/${{ github.event.number }}/ + SCHEMA_BRANCH: ${{ inputs.schema_branch }} + run: npm run build + + - name: Upload docs build as GH-Pages artifact 📦 + uses: actions/upload-artifact@v4 + with: + path: build + name: build + + deploy: + name: Deploy + runs-on: ubuntu-latest + needs: build + environment: + name: staging + url: https://staging.overturemaps.org/${{ github.event.repository.name }}/pr/${{ github.event.number }}/ + + steps: + - name: Configure AWS credentials 🔐 + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::763944545891:role/pages-staging-oidc-overturemaps + aws-region: us-west-2 + + - name: Download artifacts 📥 + uses: actions/download-artifact@v4 + with: + name: build-artifact + path: build + + - name: Copy to S3 + run: | + aws s3 sync --delete build s3://overture-managed-staging-usw2/gh-pages/${{ github.event.repository.name }}/pr/${{ github.event.number }}/ + - name: Bust the Cache + run: aws cloudfront create-invalidation --distribution-id E1KP2IN0H2RGGT --paths "/${{ github.event.repository.name }}/pr/${{ github.event.number }}/*" From 48dd29863de09266682b0fa29702c6db06bf0a14 Mon Sep 17 00:00:00 2001 From: Jennings Anderson Date: Mon, 2 Feb 2026 09:06:55 -0800 Subject: [PATCH 2/5] Move staging to managed staging --- .github/workflows/staging_deploy.yaml | 9 +-- .../staging_deploy_documentation.yml | 75 ------------------- 2 files changed, 1 insertion(+), 83 deletions(-) delete mode 100644 .github/workflows/staging_deploy_documentation.yml diff --git a/.github/workflows/staging_deploy.yaml b/.github/workflows/staging_deploy.yaml index a37a92fc..70f58169 100644 --- a/.github/workflows/staging_deploy.yaml +++ b/.github/workflows/staging_deploy.yaml @@ -4,14 +4,7 @@ run-name: Publish docs to staging website (for PR) on: pull_request: - - # Allow running from the actions tab - workflow_dispatch: - inputs: - schema_branch: - description: 'Schema branch to pull from for /reference' - required: true - default: 'main' + branches: [ main ] permissions: id-token: write diff --git a/.github/workflows/staging_deploy_documentation.yml b/.github/workflows/staging_deploy_documentation.yml deleted file mode 100644 index 3db56380..00000000 --- a/.github/workflows/staging_deploy_documentation.yml +++ /dev/null @@ -1,75 +0,0 @@ ---- -name: Staging Deploy -run-name: Publish docs to staging website (for PR) - -on: - pull_request: - - # Allow running from the actions tab - workflow_dispatch: - inputs: - schema_branch: - description: 'Schema branch to pull from for /reference' - required: true - default: 'main' - -permissions: - id-token: write - contents: read - -jobs: - build: - name: Build - runs-on: ubuntu-latest - steps: - - name: Check out the main docs repo repository and build. - uses: actions/checkout@v4 - - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: "20" - - - name: Install NPM dependencies - run: npm install --prefer-dedupe - - - name: Build Docusaurus website - env: - DOCUSAURUS_URL: https://dfhx9f55j8eg5.cloudfront.net/ - DOCUSAURUS_BASE_URL: /how-to/pr/${{github.event.number}}/ - SCHEMA_BRANCH: ${{ inputs.schema_branch }} - run: npm run build - - - name: Upload docs build as GH-Pages artifact 📦 - uses: actions/upload-artifact@v4 - with: - path: build - name: build - - publish_staging: - name: Publish to Staging Bucket - environment: - name: staging - url: https://dfhx9f55j8eg5.cloudfront.net/how-to/pr/${{github.event.number}}/ - needs: build - runs-on: ubuntu-latest - steps: - - name: Fetch AWS credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: arn:aws:iam::207370808101:role/Overture_GitHub_schema_Publish_Docs_Staging - aws-region: us-west-2 - - - name: Download GH-Pages artifact 📦 - uses: actions/download-artifact@v4 - with: - name: build - path: build - - - name: Copy to staging bucket how-to/pr/${{github.event.number}}/ - run: | - aws --region us-east-2 s3 sync --delete --storage-class INTELLIGENT_TIERING build s3://overture-schema-docs-static-staging-us-east-2/how-to/pr/${{github.event.number}} - - - name: Purge CDN cache - run: | - aws cloudfront create-invalidation --distribution-id E3L106P8HVBE9L --paths "/how-to/pr/${{github.event.number}}/*" From da936e2806b0b03dba6c4783b532c3f89709e841 Mon Sep 17 00:00:00 2001 From: Jennings Anderson Date: Mon, 2 Feb 2026 09:18:52 -0800 Subject: [PATCH 3/5] Update staging_deploy.yaml --- .github/workflows/staging_deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/staging_deploy.yaml b/.github/workflows/staging_deploy.yaml index 70f58169..51e11aee 100644 --- a/.github/workflows/staging_deploy.yaml +++ b/.github/workflows/staging_deploy.yaml @@ -37,7 +37,7 @@ jobs: uses: actions/upload-artifact@v4 with: path: build - name: build + name: build-artifact deploy: name: Deploy From 5d8387e54bb8cd48c9496118181b326fa474f5d5 Mon Sep 17 00:00:00 2001 From: Jennings Anderson Date: Mon, 2 Feb 2026 10:01:37 -0800 Subject: [PATCH 4/5] Update staging_deploy.yaml --- .github/workflows/staging_deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/staging_deploy.yaml b/.github/workflows/staging_deploy.yaml index 51e11aee..ecd7352e 100644 --- a/.github/workflows/staging_deploy.yaml +++ b/.github/workflows/staging_deploy.yaml @@ -45,7 +45,7 @@ jobs: needs: build environment: name: staging - url: https://staging.overturemaps.org/${{ github.event.repository.name }}/pr/${{ github.event.number }}/ + url: https://staging.overturemaps.org/${{ github.event.repository.name }}/pr/${{ github.event.number }}/index.html steps: - name: Configure AWS credentials 🔐 From 8cf00c3735bcdf7cbd0383e4f1b7cbc0cfb90e9f Mon Sep 17 00:00:00 2001 From: Jennings Anderson Date: Tue, 3 Feb 2026 08:22:03 -0800 Subject: [PATCH 5/5] Update .github/workflows/staging_deploy.yaml Co-authored-by: John McCall --- .github/workflows/staging_deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/staging_deploy.yaml b/.github/workflows/staging_deploy.yaml index ecd7352e..a8b7124b 100644 --- a/.github/workflows/staging_deploy.yaml +++ b/.github/workflows/staging_deploy.yaml @@ -24,7 +24,7 @@ jobs: node-version: "20" - name: Install NPM dependencies - run: npm install --prefer-dedupe + run: npm ci --omit=dev - name: Build Docusaurus website env: