try v2 for action/deploy-pages #9
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 Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
on: | |
push: | |
branches: ['main'] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3.6.0 | |
with: | |
node-version: 20.5.0 | |
- name: Install dependencies and build | |
run: | | |
npm install | |
npm run build | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v1.0.7 | |
with: | |
path: build/ | |
- name: Deploy GitHub Pages site | |
uses: actions/deploy-pages@v2 |