-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (45 loc) · 1.14 KB
/
fly.yml
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
name: Build and Deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install dependencies
run: npm install
working-directory: ./client
- name: Test
run: npm test
working-directory: ./client
- name: Generate build
run: npm run build
working-directory: ./client
- name: Share artifact inside workflow
uses: actions/upload-artifact@v1
with:
name: build
path: ./client/build
deploy:
name: Deploy app
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Get artifact
uses: actions/download-artifact@v1
with:
name: build
path: ./server/build
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
working-directory: ./server