File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments