-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up GitHub Actions workflow for GitHub Pages deployment - 2
- Loading branch information
1 parent
98f97a0
commit f08bd2e
Showing
1 changed file
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,18 +3,27 @@ name: Deploy to GitHub Pages | |
on: | ||
push: | ||
branches: | ||
- main | ||
- main # Trigger on push to main branch | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest # The action will run on the latest version of Ubuntu. | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 # Updated to v3 | ||
uses: actions/checkout@v3 # Latest version of checkout action | ||
|
||
- name: Configure Git | ||
run: | | ||
git config user.name "github-actions" | ||
git config user.email "[email protected]" | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 # Updated to v4 | ||
uses: peaceiris/actions-gh-pages@v4 # Latest version of gh-pages action | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./ | ||
github_token: ${{ secrets.GITHUB_TOKEN }} # Provided by GitHub | ||
publish_dir: ./ # The directory to deploy | ||
|
||
- name: Force Push to gh-pages | ||
run: | | ||
git push origin gh-pages --force |