fix: Page title is wrong sometimes (#2252) #823
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload production docs to GCP | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
# yamllint disable-line rule:line-length | |
group: "${{ github.workflow }} @ ${{ github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
docs-upload-to-gcp-prod: | |
timeout-minutes: 10 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4.1.0 | |
with: | |
persist-credentials: false | |
- name: Setup Node 🔧 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Deployment start | |
if: always() | |
uses: Mergifyio/gha-slack-notification@main | |
with: | |
type: deploy-start | |
project: "documentation (gatsby)" | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEPLOYMENT_WEBHOOK_URL_RELEASES }} | |
- name: Build 🔧 | |
run: | | |
npm ci | |
npm run build | |
- name: Setup Google Auth 🔧 | |
uses: "google-github-actions/auth@v1" | |
with: | |
credentials_json: "${{ secrets.GCP_DOCS_CREDENTIAL_JSON }}" | |
- name: 'Set up Cloud SDK' | |
uses: 'google-github-actions/setup-gcloud@v1' | |
- name: Deploy 🚀 | |
run: 'gsutil -m rsync -r ./public gs://mergify-docs-prod' | |
- name: Cleanup | |
run: 'gsutil -m rsync -d -r ./public gs://mergify-docs-prod' | |
- name: Set header | |
run: 'gsutil -m setmeta -r -h "Cache-control:public, max-age=600" gs://mergify-docs-prod' | |
- name: Deployment finish | |
if: always() | |
uses: Mergifyio/gha-slack-notification@main | |
with: | |
type: deploy-finish | |
project: "documentation (gatsby)" | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEPLOYMENT_WEBHOOK_URL_RELEASES }} | |
FAILURE_ONLY_SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEPLOYMENT_WEBHOOK_URL_PROD }} |