Build and upload preview for PR 171 #579
Workflow file for this run
This file contains 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 Pull Request' | |
run-name: Build and upload preview for PR ${{ github.event.pull_request.number }} | |
on: | |
pull_request: | |
types: [synchronize, opened] | |
jobs: | |
build: | |
name: Build and upload site | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: npm | |
- name: Install dependencies | |
run: npm install | |
- name: Build website | |
run: npm run build | |
- uses: matyrobbrt/cloudflare-pr-previews/upload@v1 | |
name: Upload website | |
with: | |
build-dir: ./build/ |