Repository navigation
feat(web): show the build commit and time in the footer (#3788) #1283
This file contains hidden or 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: Deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # Rebuilds the pages from the current Firestore content, for example after editing it. | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| # A manual run and a push never deploy at the same time. | |
| concurrency: deploy | |
| jobs: | |
| deploy: | |
| # A manual run can pick any branch. Only main deploys to the live site. | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 | |
| with: | |
| node-version-file: package.json | |
| - run: npm ci | |
| # `./hb setup-github` sets these variables. See docs/tutorials/04-deploy.md. | |
| - uses: google-github-actions/auth@7c6bc770dae815cd3e89ee6cdf493a5fab2cc093 # v3.0.0 | |
| with: | |
| workload_identity_provider: '${{ vars.WIF_PROVIDER }}' | |
| service_account: '${{ vars.DEPLOY_SERVICE_ACCOUNT }}' | |
| # The build renders each page from the site's content in Firestore. | |
| - run: npm run build | |
| env: | |
| FIRESTORE_TARGET: production | |
| # `--force` deletes functions that are no longer in the code, which non-interactive mode | |
| # otherwise refuses to do, and accepts Firebase's other deploy confirmations. | |
| # `./hb deploy-args` adds `--except functions` when features.functions is false. | |
| - run: npx firebase deploy --project "$(jq -r .firebase.projectId packages/config/site.json)" --non-interactive --force $(./hb deploy-args) |