Skip to content

Commit d9e3c23

Browse files
committed
chore(ci): fix page branch update
1 parent 315c47e commit d9e3c23

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Update GitHub Pages
33
on:
44
push:
55
tags:
6+
- '**'
67

78
jobs:
89
pages:
@@ -17,16 +18,18 @@ jobs:
1718
fetch-depth: 0
1819
persist-credentials: false
1920
path: release
20-
- name: Checkout and push to gh-pages
21+
- name: Checkout gh-pages branch
2122
uses: actions/checkout@v3
2223
with:
2324
fetch-depth: 0
2425
path: pages
2526
ref: gh-pages
26-
run: |
27-
cp ../release/README.md ./docs/index.md
28-
git config user.name github-actions
29-
git config user.email github-actions@github.com
30-
git add .
31-
git commit -m "docs: update docs for ${{ github.ref_name }}"
32-
git push
27+
- name: Update gh-pages branch with latest docs
28+
run: |
29+
cd "$GITHUB_WORKSPACE/pages"
30+
cp "$GITHUB_WORKSPACE/release/README.md" ./docs/index.md
31+
git config user.name github-actions
32+
git config user.email github-actions@github.com
33+
git add .
34+
git commit -m "docs: update docs for ${{ github.ref_name }}"
35+
git push

0 commit comments

Comments
 (0)