Add 2024 jiangsu (#29) #120
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
# yaml-language-server: $schema=https://json-schema.org/draft-07/schema# | |
name: Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
python_version: "3.10" | |
node_version: "18.x" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.python_version }} | |
- name: Install Python dependencies | |
run: | | |
pip install -r requirements.txt | |
- uses: pnpm/action-setup@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.node_version }} | |
- name: Install Node dependencies | |
run: | | |
pnpm i | |
- name: Build | |
env: | |
GOOGLE_ANALYTICS_KEY: G-9TCR8GN9EM | |
UPLOAD_FILE_HOST: https://xcpcio.github.io/upload-file/ | |
ENABLE_MATHJAX: false | |
run: | | |
pnpm build | |
- name: Deploy to gh-pages | |
if: ${{ github.event_name != 'pull_request' }} | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: site | |
force_orphan: true | |
user_name: "github-actions[bot]" | |
user_email: "github-actions[bot]@users.noreply.github.com" | |
commit_message: 🚀 Deploying to gh-pages @ ${{ env.GITHUB_SHA }} |