Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy Production Site

# Trigger on pushes to the main branch
on:
push:
branches: [ "main" ]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the code from the main branch
- name: Checkout main
uses: actions/checkout@v4

# Step 2: Deploy to gh-pages branch (root directory)
- name: Deploy to Production
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }} # Auto-generated by GitHub
publish_branch: gh-pages # Branch to deploy to
publish_dir: . # Directory with built files (use _site for Jekyll/Hugo)
destination_dir: . # Deploy to root of gh-pages
force_orphan: true # Keep gh-pages clean (only built files)
24 changes: 24 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy Staging Site

# Trigger on pushes to the staging branch
on:
push:
branches: [ "staging" ]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the code from the staging branch
- name: Checkout staging
uses: actions/checkout@v4

# Step 2: Deploy to gh-pages branch (staging subdirectory)
- name: Deploy to Staging
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: . # Same as production (e.g., _site for generators)
destination_dir: staging # Deploy to /staging in gh-pages
force_orphan: false # Don’t overwrite production files in gh-pages