Skip to content

Commit 6db60c4

Browse files
committed
use old config
1 parent 73aa71c commit 6db60c4

File tree

1 file changed

+5
-22
lines changed

1 file changed

+5
-22
lines changed

.github/workflows/docs.yml

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,25 +42,8 @@ jobs:
4242

4343
- name: Deploy to GitHub Pages
4444
uses: peaceiris/actions-gh-pages@v3
45-
run: |
46-
git config user.name "github-actions[bot]"
47-
git config user.email "github-actions[bot]@users.noreply.github.com"
48-
49-
BRANCH_NAME=${GITHUB_REF#refs/heads/}
50-
SAFE_BRANCH_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
51-
52-
git clone --depth=1 --branch gh-pages https://github.com/${{ github.repository }} gh-pages || \
53-
git clone --depth=1 https://github.com/${{ github.repository }} gh-pages && \
54-
cd gh-pages && \
55-
git checkout --orphan gh-pages
56-
57-
cd gh-pages
58-
59-
rm -rf "$SAFE_BRANCH_NAME"
60-
mkdir -p "$SAFE_BRANCH_NAME"
61-
62-
cp -r ../docs/book/* "$SAFE_BRANCH_NAME/"
63-
64-
git add "$SAFE_BRANCH_NAME"
65-
git commit -m "Update docs for branch $BRANCH_NAME" || echo "No changes to commit"
66-
git push origin gh-pages
45+
with:
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
47+
publish_dir: ./docs/book
48+
publish_branch: gh-pages
49+
force_orphan: true

0 commit comments

Comments
 (0)