-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (69 loc) · 2.11 KB
/
Copy pathci.yml
File metadata and controls
82 lines (69 loc) · 2.11 KB
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
74
75
76
77
78
79
80
81
82
name: CI for v1
on:
workflow_dispatch:
# schedule:
# - cron: '0 0 * * 1' # Every Monday
jobs:
backend:
runs-on: ubuntu-latest
steps:
- name: Checkout upstream repo
uses: actions/checkout@v4
with:
repository: opengovsg/FormSG
ref: refs/heads/release-al2
path: formsg
- name: Checkout this repo
uses: actions/checkout@v4
with:
path: demo
- name: Replace files with demo-specific ones
run: |
cp -rf demo/backend/* formsg/
rm -rf demo/backend
- name: Setup Fly
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy to Fly
run: flyctl deploy --remote-only --dockerfile Dockerfile.fly
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
working-directory: formsg
frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout upstream repo
uses: actions/checkout@v4
with:
repository: opengovsg/FormSG
ref: refs/heads/release-al2
path: formsg
- name: Checkout this repo
uses: actions/checkout@v4
with:
path: demo
- name: Replace files with demo-specific ones
run: |
cp -rf demo/frontend/* formsg/
rm -rf demo/frontend
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm install
working-directory: formsg
- name: Build
run: npm run build:frontend
working-directory: formsg
env:
VITE_APP_FORMSG_SDK_MODE: development
- name: 📂 Sync files
uses: SamKirkland/web-deploy@v1
with:
target-server: ny-shared01.dapanel.net
remote-user: buildingblocs
ssh-port: 53667
private-ssh-key: ${{ secrets.SSH_KEY }}
destination-path: ~/domains/form.buildingblocs.sg/public_html/
source-path: formsg/dist/frontend/
rsync-options: --archive --verbose --compress --human-readable --progress --exclude=.htaccess