Skip to content

update-triggered-by-styles-repo #679

update-triggered-by-styles-repo

update-triggered-by-styles-repo #679

Workflow file for this run

name: CI
on:
push:
branches:
- main
workflow_dispatch:
repository_dispatch:
types:
- update-triggered-by-wiki-repo
- update-triggered-by-plugins-repo
- update-triggered-by-styles-repo
- update-triggered-by-translators-repo
- update-triggered-by-blog-repo
- update-content
permissions:
contents: write
concurrency:
group: pages
cancel-in-progress: false
env:
TZ: Asia/Shanghai
jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
secrets: inherit
deploy-github:
name: Deploy to GitHub Pages
if: github.ref_name == 'main' && github.event_name != 'pull_request' && github.repository == 'zotero-chinese/website'
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download Build Output
uses: actions/download-artifact@v4
with:
name: build-result
path: dist
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
with:
repository-name: zotero-chinese/zotero-chinese.github.io
branch: gh-pages
folder: dist
single-commit: true
token: ${{ secrets.ACCESS_TOKEN }}
git-config-name: github-actions[bot]
git-config-email: github-actions[bot]@users.noreply.github.com
# 当前将 netlify 链接到 zotero-chinese.github.io 仓库的 main 分支,启用自动构建,故无需此任务
# deploy-netlify:
# name: Deploy to Netlify
# if: github.ref_name == 'main' && github.event_name != 'pull_request' && github.repository == 'zotero-chinese/website'
# needs:
# - build
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Download Build Output
# uses: actions/download-artifact@v4
# with:
# name: build-result
# path: dist
# - name: Install pnpm
# uses: pnpm/action-setup@v3
# with:
# version: 9
# - name: Install Netlify CLI
# run: pnpm install -g netlify-cli
# - name: Push to Netlify
# uses: nick-fields/retry@v3
# with:
# timeout_minutes: 3
# max_attempts: 3
# command: netlify deploy --dir 'dist' --prod --debug
# env:
# NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
# NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}