Skip to content

Commit 0d2b377

Browse files
committed
优化GitHub Actions工作流,更新Node.js设置,添加依赖安装和构建步骤
1 parent 7269abb commit 0d2b377

1 file changed

Lines changed: 22 additions & 7 deletions

File tree

.github/workflows/vuepress-deploy.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,27 @@ jobs:
66
steps:
77
- name: Checkout
88
uses: actions/checkout@master
9+
with:
10+
# fetch all commits to get last updated time or other git log info
11+
fetch-depth: 0
912

10-
- name: vuepress-deploy
11-
uses: jenkey2011/vuepress-deploy@master
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v4
15+
with:
16+
node-version: 12
17+
18+
- name: Install deps
19+
run: yarn
20+
21+
- name: Build VuePress site
22+
run: yarn build
23+
24+
# please check out the docs of the workflow for more details
25+
# @see https://github.com/crazy-max/ghaction-github-pages
26+
- name: Deploy to GitHub Pages
27+
uses: crazy-max/ghaction-github-pages@v4
28+
with:
29+
target_branch: gh-pages
30+
build_dir: docs/.vuepress/dist/
1231
env:
13-
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
14-
TARGET_REPO: copytranslator/copytranslator.github.io
15-
TARGET_BRANCH: gh_pages
16-
BUILD_SCRIPT: yarn && yarn build
17-
BUILD_DIR: docs/.vuepress/dist/
32+
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

0 commit comments

Comments
 (0)