Skip to content

Commit ab01633

Browse files
authored
Enable last-updated plugin in deployment workflow (#647)
Replaced jenkey2011/vuepress-deploy with crazy-max/ghaction-github-pages to support the recently added last-updated plugin. The new workflow is based on the VuePress v2 deployment guide: https://vuepress.github.io/guide/deployment.html#github-pages Bug: jenkey2011/vuepress-deploy#36 Related: #595
1 parent ff8545b commit ab01633

File tree

1 file changed

+22
-7
lines changed

1 file changed

+22
-7
lines changed

.github/workflows/deploy-gh_pages.yml

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,27 @@ jobs:
1010
steps:
1111
- name: Checkout
1212
uses: actions/checkout@master
13+
with:
14+
# fetch all commits to get last updated time or other git log info
15+
fetch-depth: 0
1316

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

0 commit comments

Comments
 (0)