File tree 2 files changed +59
-20
lines changed
2 files changed +59
-20
lines changed Original file line number Diff line number Diff line change 1
- name : Gatsby Publish
1
+ name : Build and Site
2
2
3
3
on :
4
4
push :
5
5
branches :
6
- - master
6
+ - main
7
7
8
8
jobs :
9
- build :
9
+ build-and-deploy :
10
10
runs-on : ubuntu-latest
11
+
12
+ env :
13
+ MY_ENV_VAR : " some_value"
14
+
11
15
steps :
12
- - uses : actions/checkout@v3
13
- -
uses :
SpicyPizza/[email protected]
14
- with :
15
- envkey_AIRTABLE_API_KEY : ${{ secrets.AIRTABLE_API_KEY }}
16
- envkey_AIRTABLE_PEOPLE_BASE_ID : appk2btw36qEO3vFo
17
- envkey_AIRTABLE_RESEARCH_BASE_ID : appTv9J1zxqaNgBHi
18
- envkey_AIRTABLE_POSTS_BASE_ID : appsY0VXF7pbv3mKR
19
- - uses : actions/setup-node@v3
16
+ - name : Checkout code
17
+ uses : actions/checkout@v3
18
+
19
+ - name : Setup Node.js
20
+ uses : actions/setup-node@v3
20
21
with :
21
- node-version : 16.x
22
- - name : npm install and build and deploy
23
- run : |
24
- npm install
25
- npm run build
26
- - uses : peaceiris/actions-gh-pages@v2
22
+ node-version : ' 20.x'
23
+
24
+ - name : Install dependencies
25
+ run : npm install
26
+
27
+ - name : Build project
28
+ run : npm run build
29
+
30
+ - name : Deploy to server
27
31
env :
28
- ACTIONS_DEPLOY_KEY : ${{ secrets.ACCESS_TOKEN }}
29
- PUBLISH_BRANCH : gh-pages
30
- PUBLISH_DIR : ./public
32
+ RSYNC_RSH : " ssh -i ${{ secrets.SSH_SECRET_KEY }} -o StrictHostKeyChecking=no"
33
+ run : |
34
+ rsync -avz --delete --quiet ./public/ [email protected] :/var/www/mith.umd.edu
35
+
36
+ - name : Clean up
37
+ run : rm -rf ./public/
Original file line number Diff line number Diff line change
1
+ name : Publish Staging Site on GitHub Pages
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+
8
+ jobs :
9
+ build :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - uses : actions/checkout@v3
13
+ -
uses :
SpicyPizza/[email protected]
14
+ with :
15
+ envkey_AIRTABLE_TOKEN : ${{ secrets.AIRTABLE_API_KEY }}
16
+ envkey_AIRTABLE_PEOPLE_BASE_ID : appk2btw36qEO3vFo
17
+ envkey_AIRTABLE_RESEARCH_BASE_ID : appTv9J1zxqaNgBHi
18
+ envkey_AIRTABLE_EVENTS_BASE_ID : tbl6CURONRn8ML6le
19
+ envkey_AIRTABLE_POSTS_BASE_ID : appsY0VXF7pbv3mKR
20
+ envkey_AIRTABLE_MITH_BASE_ID : appMWsw8HKjjokBg2
21
+ - uses : actions/setup-node@v3
22
+ with :
23
+ node-version : 16.x
24
+ - name : npm install and build and deploy
25
+ run : |
26
+ npm install
27
+ npm run build
28
+ - uses : peaceiris/actions-gh-pages@v4
29
+ env :
30
+ ACTIONS_DEPLOY_KEY : ${{ secrets.ACCESS_TOKEN }}
31
+ PUBLISH_BRANCH : gh-pages
32
+ PUBLISH_DIR : ./public
You can’t perform that action at this time.
0 commit comments