Skip to content

Commit f736797

Browse files
committed
manually preserve changes
1 parent f4c6215 commit f736797

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/pages.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
name: GitHub Pages
2-
on:
3-
push:
4-
branches:
5-
- main
2+
on: push
63
permissions:
74
contents: write
85
jobs:
@@ -19,12 +16,16 @@ jobs:
1916
run: pnpm build
2017
- name: Remove all files except dist directory
2118
run: find . -maxdepth 1 ! -name 'dist' ! -name '.git' ! -name '.' -exec rm -rf {} +
22-
- name: Move dist to docs
23-
run: mv dist docs
19+
- name: Move dist to temporary docs directory
20+
run: mv dist $RUNNER_TEMP/docs
2421
- uses: actions/checkout@v3
2522
with:
2623
ref: 'gh-pages'
2724
clean: false
25+
- name: Replace docs directory with the new one
26+
run: |
27+
rm -rf docs
28+
mv $RUNNER_TEMP/docs docs
2829
- name: Push to gh-pages
2930
run: |
3031
git config user.name "github-actions[bot]"

0 commit comments

Comments
 (0)