Deploy Live #114
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
| # This file was auto-generated by the Firebase CLI | |
| # https://github.com/firebase/firebase-tools | |
| name: Deploy Live | |
| 'on': | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build_and_deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout | |
| - uses: actions/checkout@v4 | |
| # Build | |
| - name: Read Node version from mise.toml | |
| id: node | |
| run: echo "version=$(grep -E '^node\\s*=' mise.toml | sed -E 's/.*"([^"]+)".*/\\1/')" >> | |
| "$GITHUB_OUTPUT" | |
| - name: Install package manager (from package.json) | |
| run: | | |
| corepack enable | |
| corepack install | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ steps.node.outputs.version }} | |
| - name: Resolve yarn cache folder | |
| id: yarn-config | |
| run: echo "cacheFolder=$(yarn config get cacheFolder)" >> "$GITHUB_OUTPUT" | |
| - name: Restore yarn install cache (node_modules + cacheFolder + install-state) | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| ${{ steps.yarn-config.outputs.cacheFolder }} | |
| .yarn/install-state.gz | |
| key: | |
| yarn-${{ runner.os }}-node${{ steps.node.outputs.version }}-${{ hashFiles('yarn.lock') | |
| }} | |
| restore-keys: | | |
| yarn-${{ runner.os }}-node${{ steps.node.outputs.version }}- | |
| - name: Install dependencies | |
| env: | |
| YARN_ENABLE_HARDENED_MODE: 'false' | |
| run: | | |
| case "$(yarn --version)" in 1.*) echo 'expected up-to-date yarn version'; exit 1 ;; esac | |
| yarn install --immutable | |
| - name: Build website | |
| run: yarn build | |
| # Deploy | |
| - uses: FirebaseExtended/action-hosting-deploy@v0 | |
| with: | |
| repoToken: '${{ secrets.GITHUB_TOKEN }}' | |
| firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_GAME_CI_5559F }}' | |
| channelId: live | |
| projectId: game-ci-5559f |