feat: click-through toggle #92
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: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_call: | |
| inputs: | |
| version-number: | |
| type: string | |
| workflow_dispatch: | |
| inputs: | |
| version-number: | |
| type: string | |
| required: true | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the repository | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| # Set up Node.js environment | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: "pnpm" | |
| # Install dependencies | |
| - name: Install dependencies | |
| run: pnpm install | |
| # Cache build folder based on commit SHA | |
| - name: Cache build folder | |
| id: cache-build | |
| uses: actions/cache@v4 | |
| with: | |
| path: build/ | |
| key: ${{ runner.os }}-build-${{ github.sha }} | |
| # Run build only if cache miss | |
| - name: Build project | |
| if: steps.cache-build.outputs.cache-hit != 'true' | |
| run: pnpm run build | |
| # Upload the build folder as an artifact after the build (keeping this for reference) | |
| - name: Upload build folder | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build | |
| path: build/ |