From 83a06a4287f3c700dd62c758ea113ef070f0bfb0 Mon Sep 17 00:00:00 2001 From: phantooom Date: Sun, 7 Apr 2024 22:13:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pages.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 170d6a0..c035e76 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -36,15 +36,12 @@ jobs: uses: actions/upload-pages-artifact@v2 with: path: ./public - - name: Deploy to Github Pages - env: - GIT_NAME: phantooom - GIT_EMAIL: xiaorui.zou@gmail.com - run: | - git config --global init.defaultBranch master - git config --global user.name $GIT_NAME - git config --global user.email $GIT_EMAIL - cd public && git init && git add . - git commit -m "Site deployed by GitHub Actions" - git remote add blog https://${{ secrets.action }}@github.com/phantooom/phantooom.github.io.git - git push --force --quiet blog master \ No newline at end of file + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4.3.3 + with: + token: ${{ secrets.TOKEN_PAGES }} + repository-name: phantooom/phantooom.github.io + branch: master # The branch the action should deploy to. + folder: public # The folder the action should deploy. + single-commit: true + commit-message: "Deploy by source" \ No newline at end of file