Skip to content

Build

Build #18783

Workflow file for this run

# yaml-language-server: $schema=https://json-schema.org/draft-07/schema#
name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "0 */1 * * *"
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python runtime
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install Python dependencies
run: |
pip install -r requirements.txt
- uses: pnpm/action-setup@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: pnpm
- name: Install Node dependencies
run: |
pnpm i
- name: Build
env:
GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }}
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: dist
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 }}