-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: deploy to main branch of zotero-chinese.github.io
to override main--zotero-zh.netlify.app
- Loading branch information
Showing
4 changed files
with
40 additions
and
31 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,43 +50,44 @@ jobs: | |
uses: JamesIves/[email protected] | ||
with: | ||
repository-name: zotero-chinese/zotero-chinese.github.io | ||
branch: gh-pages | ||
branch: main | ||
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 | ||
|
||
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 | ||
# 当前将 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: 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 pnpm | ||
# uses: pnpm/action-setup@v3 | ||
# with: | ||
# version: 9 | ||
|
||
- name: Install Netlify CLI | ||
run: pnpm install -g netlify-cli | ||
# - 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 }} | ||
# - 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 }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,7 @@ jobs: | |
uses: nwtgck/[email protected] | ||
with: | ||
publish-dir: dist | ||
deploy-message: Deploy from GitHub Actions | ||
deploy-message: 'Deploy from GitHub Actions PR #${{ env.PR_NUM }}' | ||
production-deploy: false | ||
alias: deploy-preview-${{ env.PR_NUM }} | ||
enable-commit-comment: false | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# zotero-chinese.com | ||
|
||
<!-- 此文件将作为 zotero-chinese.github.io 仓库的自述文件,非此目录的说明文件 --> | ||
|
||
![GitHub repo size](https://img.shields.io/github/repo-size/zotero-chinese/zotero-chinese.github.io) | ||
|
||
本仓库 (`zotero-chinese/zotero-chinese.github.io`) 存放了 Zotero 中文社区官方网站的构建结果,是 GitHub Pages 兼容仓库,仅包含构建结果,不包含文档源文件,你可以直接 [访问网站](https://zotero-chinese.com)。贡献文档请访问 [zotero-chinese/wiki](https://github.com/zotero-chinese/wiki) 仓库。 |