Skip to content

Commit eff5729

Browse files
committed
feat: add GitHub Actions workflow for staging deployment
1 parent 9694bb4 commit eff5729

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/staging.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy staging instance
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
8+
permissions:
9+
contents: write # allow GITHUB_TOKEN to push to gh-pages
10+
11+
jobs:
12+
build-and-deploy:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
19+
- name: Setup Node.js with cache
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: '23'
23+
cache: 'npm' # enables automatic caching based on package-lock.json
24+
25+
- name: Install dependencies
26+
run: npm install
27+
28+
- name: Generate static site
29+
run: npm run build
30+
31+
- name: Deploy to GitHub Pages
32+
uses: peaceiris/actions-gh-pages@v3
33+
with:
34+
github_token: ${{ secrets.GITHUB_TOKEN }} # built-in token, no manual secret needed
35+
publish_dir: ./dist
36+
publish_branch: build-staging
37+

0 commit comments

Comments
 (0)