Merge pull request #397 from Hridwick321/my-feature-branch #221
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: [release] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Cache node_modules | |
| id: node-cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
| - name: Install Packages | |
| if: steps.node-cache.outputs.cache-hit != 'true' | |
| run: npm install | |
| - name: Cache build | |
| id: node_build-cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: public | |
| key: ${{ runner.os }}-${{ github.sha }} | |
| - name: Gatsby Build | |
| run: npm run build |