misc: data change #18
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 and Deploy | |
on: | |
push: | |
branches: [ "master" ] | |
paths-ignore: | |
- 'README.md' | |
- 'LICENSE' | |
- '.gitignore' | |
workflow_dispatch: | |
permissions: | |
pages: write | |
id-token: write | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "16" | |
cache: 'yarn' | |
- name: Bootstrap dependencies | |
run: | | |
sudo apt install -y fonts-noto-color-emoji fonts-wqy-microhei | |
- name: Bootstrap node environment | |
run: | | |
yarn | |
- name: Build HTML dist files | |
run: | | |
if [ -z "$BASE_PREFIX" ]; then | |
export BASE_PREFIX="/$(echo "$GITHUB_REPOSITORY" | cut -d '/' -f 2)/" | |
fi | |
yarn build | |
- name: Upload HTML dist files to artifacts | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: dist/client | |
deploy: | |
runs-on: ubuntu-22.04 | |
needs: build | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |