Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kevshin2002 committed Dec 5, 2024
1 parent 88cfe18 commit 458283a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
name: Deploy Docusaurus
name: Deploy Docusaurus Website

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: write
pages: write
id-token: write

jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest

steps:
Expand All @@ -33,15 +38,16 @@ jobs:
run: npm run build

- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
working-directory: docusaurus
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email '[email protected]'
REPOSITORY_URL="https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git"
REPOSITORY_URL="https://${{ github.actor }}:${{ secrets.GH_PAB_TOKEN }}@github.com/${{ github.repository }}.git"
git remote set-url origin "$REPOSITORY_URL"
npm run deploy
env:
GIT_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_PAB_TOKEN }}

0 comments on commit 458283a

Please sign in to comment.