-
Notifications
You must be signed in to change notification settings - Fork 12
36 lines (35 loc) · 1.18 KB
/
deploy.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
name: Deploy to Production
on:
release:
# type: released
# A release was published, or a pre-release was changed to a release.
types: [released]
# repository_dispatch:
# types: [deploy]
jobs:
deploy:
name: Deploy to Fly.io and Netlify
runs-on: ubuntu-latest
steps:
- uses: superfly/flyctl-actions/setup-flyctl@master
- uses: dsaltares/fetch-gh-release-asset@master
with:
file: "static-assets.tar.gz"
- name: Un-tar static assets
run: tar -xzvf static-assets.tar.gz
- name: Publish to Netlify
uses: netlify/actions/cli@master
with:
# args: deploy --dir=target/site --prod
# temporarily use preview deploy
args: deploy --dir=target/site
env:
NETLIFY_SITE_ID: b635e6d9-900c-4c21-993d-11191073ff32
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
- uses: dsaltares/fetch-gh-release-asset@master
with:
file: "fly.toml"
- run: flyctl deploy --image $IMAGE_LABEL
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
IMAGE_LABEL: registry.fly.io/christopherbiscardi:${{github.event.release.name}}