-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (60 loc) · 1.73 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: CI
on:
push:
branches: [main]
workflow_dispatch:
repository_dispatch:
types: [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:
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
with:
persist-credentials: false
fetch-depth: 0
- name: Download Build Output
uses: actions/download-artifact@v4
with:
name: build-result
path: dist
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
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
- name: Deploy to Netlify
id: netlify
uses: nwtgck/[email protected]
with:
publish-dir: "dist"
deploy-message: "Deploy from GitHub Actions"
production-deploy: true
enable-commit-comment: false
enable-pull-request-comment: false
enable-commit-status: false
enable-github-deployment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 3