Use peaceiris/actions-gh-pages for docs deploy

This commit is contained in:
Nguyễn Gia Phong 2020-10-02 21:28:34 +07:00
parent fae0848283
commit 74a9989e53
1 changed files with 4 additions and 22 deletions

View File

@ -41,26 +41,8 @@ jobs:
working-directory: docs
run: make html
- name: Configure git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.email mcsinyx@disroot.org
git config user.name Nguyễn\ Gia\ Phong
git remote set-url origin \
https://token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY
git fetch origin gh-pages
- name: Deploy site
run: |
git switch gh-pages
git rm -r .
shopt -s dotglob
mv docs/build/html/* .
rm -r docs
git add .
if git commit -m "Build at $(date --iso-8601=seconds)"
then
git push origin gh-pages
fi
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/html