-
Notifications
You must be signed in to change notification settings - Fork 0
24 lines (21 loc) · 874 Bytes
/
deploy-staging.yml
File metadata and controls
24 lines (21 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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