File tree 3 files changed +28
-2
lines changed
3 files changed +28
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : Gatsby Deploy
2
+
3
+ on :
4
+ push :
5
+ branches : main
6
+
7
+ env :
8
+ GH_TOKEN : ${{ secrets.GH_TOKEN }}
9
+
10
+ jobs :
11
+ build :
12
+ runs-on : ubuntu-latest
13
+ steps :
14
+ - name : GitHub Config
15
+ run : |
16
+ git config --global user.email "[email protected] "
17
+ git config --global user.name "jiros"
18
+ - name : Checkout
19
+ uses : actions/checkout@v2
20
+ - name : Install dependencies
21
+ run : |
22
+ npm install
23
+ - name : Deploy
24
+ run : npm run deploy:ci
Original file line number Diff line number Diff line change @@ -100,4 +100,4 @@ The fastest way to combine your favorite tools and APIs to build the fastest sit
100
100
101
101
# Deploy to GitHub Pages
102
102
103
- https://dev.to/flexdinesh/deploy- gatsby-sites -to-github-pages-eed
103
+ https://medium.com/@sam-king/deploying-a- gatsby-site -to-github-pages-using-github-actions-ci-cd-be0465a8cdb8
Original file line number Diff line number Diff line change 29
29
"start" : " gatsby develop" ,
30
30
"serve" : " gatsby serve" ,
31
31
"clean" : " gatsby clean" ,
32
- "test" : " echo \" Write tests! -> https://gatsby.dev/unit-testing\" && exit 1"
32
+ "test" : " echo \" Write tests! -> https://gatsby.dev/unit-testing\" && exit 1" ,
33
+ "deploy" : " gatsby build --prefix-paths && gh-pages -d public" ,
34
+ "deploy:ci" :
" gatsby build --prefix-paths && gh-pages -d public -r https://[email protected] /username/repo.git"
33
35
},
34
36
"repository" : {
35
37
"type" : " git" ,
You can’t perform that action at this time.
0 commit comments