Merge pull request #18 from justinfarrelldev/spelling-additions #44
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
# See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/ | |
name: Fly Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
security: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Run Snyk to check for vulnerabilities | |
uses: snyk/actions/golang@master | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
test: | |
name: Test app | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Go 1.23.x | |
uses: actions/setup-go@v5 | |
with: | |
go-version: "1.23.0" | |
- name: Install dependencies | |
run: go install | |
- name: Run tests | |
run: go test ./... | |
deploy: | |
needs: | |
- test | |
- security | |
name: Deploy app | |
runs-on: ubuntu-latest | |
concurrency: deploy-group # optional: ensure only one action runs at a time | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- run: flyctl deploy --remote-only | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |