-
Notifications
You must be signed in to change notification settings - Fork 25
37 lines (30 loc) · 930 Bytes
/
ci.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
name: CI
on:
push:
branches: [main, release]
pull_request:
branches: "**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: Build
run: |
flyctl -c fly.staging.toml deploy --remote-only --build-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- name: Deploy to Staging
run: |
flyctl -c fly.staging.toml deploy --remote-only --wait-timeout=1800
if: ${{ github.ref == 'refs/heads/main' }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
- name: Deploy to Production
run: |
flyctl -c fly.production.toml deploy --remote-only --wait-timeout=1800
if: ${{ github.ref == 'refs/heads/release' }}
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}