- updated workflow to publish on gh-pages #5
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 website | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
permissions: | |
contents: write # required to push to gh-pages | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
- name: setup NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18' # optional: specify version | |
- name: install dependencies | |
run: npm install | |
- name: build website | |
run: npm run build | |
- name: Deploy to gh-pages branch | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist |