Skip to content

Commit 9b333c4

Browse files
committed
Switch deploy to SSH deploy key — drop PAT auth entirely
1 parent 9a5ec27 commit 9b333c4

1 file changed

Lines changed: 6 additions & 14 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,9 @@ jobs:
3636
run: hugo --minify
3737

3838
- name: Deploy to vibhu2.github.io
39-
env:
40-
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
41-
run: |
42-
git config --global user.name "github-actions[bot]"
43-
git config --global user.email "github-actions[bot]@users.noreply.github.com"
44-
git config --global credential.helper store
45-
echo "https://Vibhu2:${DEPLOY_TOKEN}@github.com" > ~/.git-credentials
46-
47-
cd public
48-
git init
49-
git checkout -b main
50-
git add .
51-
git commit -m "Deploy: ${{ github.sha }}"
52-
git push --force https://github.com/Vibhu2/vibhu2.github.io.git main
39+
uses: peaceiris/actions-gh-pages@v4
40+
with:
41+
deploy_key: ${{ secrets.DEPLOY_KEY }}
42+
external_repository: Vibhu2/vibhu2.github.io
43+
publish_branch: main
44+
publish_dir: ./public

0 commit comments

Comments
 (0)