Skip to content

Commit

Permalink
Set up GitHub Actions workflow for GitHub Pages deployment - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhjain1712 committed Aug 31, 2024
1 parent 98f97a0 commit f08bd2e
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit f08bd2e

Please sign in to comment.