Skip to content

CI

CI #457

Workflow file for this run

name: CI
on:
schedule:
- cron: '25 1 * * *'
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
env:
TZ: Asia/Shanghai
jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
secrets: inherit
deploy:
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Download Build Output
uses: actions/download-artifact@v4
with:
name: artifact
path: dist
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist
single-commit: true
git-config-name: github-actions[bot]
git-config-email: github-actions[bot]@users.noreply.github.com
sync-gitee:
name: Sync to Gitee
needs:
- deploy
uses: ./.github/workflows/sync-to-gitee.yml
secrets: inherit
send-dispatch:
name: Send dispatch to website
if: github.ref_name == 'main'
needs:
- deploy
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}
repository: zotero-chinese/website
event-type: update-content