feat: update #17
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: Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
submodules: recursive | |
- name: Use Node.js 20 | |
uses: actions/[email protected] | |
with: | |
node-version-file: .nvmrc | |
- name: Cache NPM dependencies | |
uses: actions/[email protected] | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-npm-cache | |
restore-keys: ${{ runner.OS }}-npm-cache | |
- name: Install Dependencies | |
run: yarn install | |
- name: Build | |
run: yarn build | |
- name: Upload Pages artifact | |
uses: actions/[email protected] | |
with: | |
path: ./public | |
deploy: | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/[email protected] |