-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (61 loc) · 1.62 KB
/
gatsby-build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build and Zip
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js 19.x
uses: actions/setup-node@v3
with:
node-version: '19'
- name: Install dependencies
run: yarn install
- name: Build project
run: yarn build
- name: Zip public directory
run: |
cd public
zip -r ../public.zip *
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: public.zip
path: public.zip
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: public.zip
path: ./
- name: List directory contents
run: |
ls -la
pwd
- name: Transfer public.zip to server
uses: appleboy/scp-action@master
with:
host: tricycle.cs.washington.edu
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
source: "public.zip"
target: "~/"
- name: Deploy to server
uses: appleboy/ssh-action@master
with:
host: tricycle.cs.washington.edu
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
script: |
rm -rf /cse/web/research/raivn/*
mv ~/public.zip /cse/web/research/raivn/public.zip
cd /cse/web/research/raivn
unzip public.zip
rm public.zip