From 767889af6496d326ab1160a984bd1b2aa92335bd Mon Sep 17 00:00:00 2001 From: narugo1992 Date: Wed, 24 Jan 2024 18:47:10 +0800 Subject: [PATCH] dev(narugo): use a usable token --- .github/workflows/doc.yml | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 0e13cfdcc7..91758690f5 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -147,12 +147,26 @@ jobs: make pdocs mv ./docs/build/html ./public - name: Deploy to Github Page - uses: JamesIves/github-pages-deploy-action@3.7.1 - with: - REPOSITORY_NAME: deepghs/imgutils-docs + env: ACCESS_TOKEN: ${{ secrets.GH_TOKEN }} - GIT_CONFIG_NAME: narugo1992 - GIT_CONFIG_EMAIL: narugo992@gmail.com - BRANCH: gh-pages # The branch the action should deploy to. - FOLDER: public # The folder the action should deploy. - CLEAN: true # Automatically remove deleted files from the deploy branch + run: | + git config user.name narugo1992 + git config user.email narugo992@gmail.com + git clone https://narugo1992:${{ secrets.GH_TOKEN }}@github.com/deepghs/imgutils-docs.git + cd imgutils-docs + git checkout gh-pages + rm -rf * && cp -rf ../public/* . + git add -A + git diff-index --quiet HEAD || git commit -a -m "dev(narugo): auto documentation $(date -R)" + git push origin gh-pages +# +# - name: Deploy to Github Page +# uses: JamesIves/github-pages-deploy-action@3.7.1 +# with: +# REPOSITORY_NAME: deepghs/imgutils-docs +# ACCESS_TOKEN: ${{ secrets.GH_TOKEN }} +# GIT_CONFIG_NAME: narugo1992 +# GIT_CONFIG_EMAIL: narugo992@gmail.com +# BRANCH: gh-pages # The branch the action should deploy to. +# FOLDER: public # The folder the action should deploy. +# CLEAN: true # Automatically remove deleted files from the deploy branch