File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-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 :
6+ - main # Trigger deployment on push to main
7+ paths :
8+ - ' **/*' # Deploy on changes to any files
9+
10+ jobs :
11+ deploy :
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - name : Checkout repository
16+ uses : actions/checkout@v2
17+
18+ - name : Set up Node.js
19+ uses : actions/setup-node@v2
20+ with :
21+ node-version : ' 14' # Adjust based on your node version
22+
23+ - name : Install dependencies
24+ run : |
25+ npm install
26+
27+ - name : Build the project
28+ run : |
29+ npm run build # This will build your project (adjust the command if needed)
30+
31+ - name : Deploy to GitHub Pages
32+ uses : actions/deploy-pages@v4
33+ with :
34+ branch : gh-pages # GitHub Pages will serve from this branch
35+ folder : build # The folder that contains the build output (adjust if your folder is different)
You can’t perform that action at this time.
0 commit comments