Skip to content

Commit

Permalink
Fix: Correct GitHub token usage for gh-pages branch cleanup and add d…
Browse files Browse the repository at this point in the history
…ebugging step
  • Loading branch information
xoorbes committed Sep 1, 2024
1 parent f8c2ca3 commit 8dad32f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
persist-credentials: false # Ensure the token is not persisted in the git config
persist-credentials: false
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Node.js
uses: actions/setup-node@v4
Expand All @@ -30,6 +31,9 @@ jobs:
- name: Build Docusaurus site
run: npm run build

- name: Print git remote
run: git remote -v

- name: Clean gh-pages branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -41,8 +45,7 @@ jobs:
git rm -rf .
git clean -fdx
git commit --allow-empty -m "Clean gh-pages branch"
git push origin gh-pages
git push https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/ttsk-ngo/swdr5-docs.git gh-pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
Expand Down

0 comments on commit 8dad32f

Please sign in to comment.