Skip to content

Commit 3c19a83

Browse files
authored
Add GitHub Actions workflow for production deployment
1 parent defbde9 commit 3c19a83

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Deploy Production Site
2+
3+
# Trigger on pushes to the main branch
4+
on:
5+
push:
6+
branches: [ "main" ]
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
steps:
12+
# Step 1: Check out the code from the main branch
13+
- name: Checkout main
14+
uses: actions/checkout@v4
15+
16+
# Step 2: Deploy to gh-pages branch (root directory)
17+
- name: Deploy to Production
18+
uses: peaceiris/actions-gh-pages@v4
19+
with:
20+
github_token: ${{ secrets.GITHUB_TOKEN }} # Auto-generated by GitHub
21+
publish_branch: gh-pages # Branch to deploy to
22+
publish_dir: . # Directory with built files (use _site for Jekyll/Hugo)
23+
destination_dir: . # Deploy to root of gh-pages
24+
force_orphan: true # Keep gh-pages clean (only built files)

0 commit comments

Comments
 (0)