Merge pull request #1 from mstephen19/develop #10
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: Github Page | |
| permissions: | |
| pages: write | |
| id-token: write | |
| contents: read | |
| on: | |
| push: | |
| branches: [main] | |
| jobs: | |
| build-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Node 20 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Cache dependencies | |
| id: cache_dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ./site/node_modules | |
| key: node-modules-${{ hashFiles('./site/yarn.lock') }} | |
| - name: Run install | |
| working-directory: ./site | |
| if: steps.cache_dependencies.outputs.cache-hit != 'true' | |
| run: yarn install | |
| - name: Run build | |
| working-directory: ./site | |
| run: yarn build | |
| - name: Create .nojekyll | |
| working-directory: ./site | |
| run: touch ./out/.nojekyll | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./site/out | |
| - name: Publish to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |