Skip to content

Commit f1f710e

Browse files
authored
Fixed deploy.yaml
1 parent 9e0c8aa commit f1f710e

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

.github/workflows/deploy.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,22 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- name: Checkout code
18-
uses: actions/checkout@v3
1917

20-
- name: Deploy to GitHub Pages
21-
uses: peaceiris/actions-gh-pages@v3
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
2220
with:
23-
github_token: ${{ secrets.GITHUB_TOKEN }}
24-
publish_dir: ./public
21+
token: ${{ secrets.GH_TOKEN }}
22+
23+
- name: Set up Git
24+
run: |
25+
git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git
26+
git config --global user.name "GitHub Actions"
27+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
28+
29+
- name: Deploy to GitHub Pages
30+
run: |
31+
git checkout gh-pages
32+
# Make changes to gh-pages branch if necessary
33+
git add .
34+
git commit -m "Deploy updates"
35+
git push origin gh-pages --force

0 commit comments

Comments
 (0)