File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ push :
5+ branches : [ main ] # or your default branch name (could be 'master')
6+ workflow_dispatch : # allows manual triggering
7+
8+ jobs :
9+ build-and-deploy :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout code
13+ uses : actions/checkout@v3
14+
15+ - name : Setup Node.js
16+ uses : actions/setup-node@v3
17+ with :
18+ node-version : ' 16' # or your preferred Node.js version
19+
20+ - name : Install dependencies
21+ run : npm install # or yarn install
22+
23+ - name : Build with API key
24+ env :
25+ REACT_APP_API_KEY : ${{ secrets.API_KEY }} # Uses the secret you'll create
26+ run : npm run build # or your build command
27+
28+ - name : Deploy to GitHub Pages
29+ uses : JamesIves/github-pages-deploy-action@v4
30+ with :
31+ folder : build # or your build output directory (dist, public, etc.)
32+ branch : gh-pages # The branch the action should deploy to
You can’t perform that action at this time.
0 commit comments