gh-2024-09-01-9cdee334431736b052b613dbc83029769e1f1940 #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |