Try to use artifacts instead #13
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: Publish benchmarks to GitHub Pages | ||
| on: | ||
| push: | ||
| branches: | ||
| - update-chipsets | ||
| permissions: | ||
| contents: read | ||
| pages: write | ||
| id-token: write | ||
| jobs: | ||
| auto-update: | ||
| name: Automated benchmarks update | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: ${{ github.head_ref }} | ||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18.x' | ||
| - name: Cache dependencies | ||
| uses: actions/cache@v4 | ||
| id: yarn-cache | ||
| with: | ||
| path: | | ||
| node_modules | ||
| */*/node_modules | ||
| key: ${{ runner.os }}-install-${{ hashFiles('**/yarn.lock') }} | ||
| - name: Install dependencies (cold) | ||
| if: ${{ steps.yarn-cache.outputs.cache-hit != 'true' }} | ||
| run: yarn install | ||
| - name: Install dependencies (cache hit) | ||
| if: ${{ steps.yarn-cache.outputs.cache-hit == 'true' }} | ||
| run: yarn install --prefers-offline | ||
| - name: Bump patch version | ||
| run: npm version patch --no-git-tag-version | ||
| - name: Update benchmarks | ||
| run: yarn run update-benchmarks | ||
| - name: Build final result | ||
| run: yarn build | ||
| - name: Upload benchmarks as Pages artifact | ||
| uses: actions/upload-pages-artifact@v1 | ||
| with: | ||
| path: benchmarks | ||
| - name: Deploy to GitHub Pages | ||
| uses: actions/deploy-pages@v1 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||