FEAT: update allow origin from vars, limit methods (#35) #16
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 Fly | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
name: Deploy app | |
runs-on: ubuntu-latest | |
concurrency: deploy-group | |
permissions: | |
deployments: write | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/checkout@v4 | |
- name: Setup Fly π§° | |
uses: superfly/flyctl-actions/setup-flyctl@master | |
- name: Create GitHub deployment π | |
uses: chrnorm/deployment-action@v2 | |
id: deployment | |
with: | |
token: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }} | |
environment-url: http://api.web-check.xyz | |
environment: production | |
- name: Deploy to Fly.io π©οΈ | |
run: flyctl deploy --remote-only | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }} | |
- name: Update deployment status (success) β | |
if: success() | |
uses: chrnorm/deployment-status@v2 | |
with: | |
token: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }} | |
environment-url: ${{ steps.deployment.outputs.environment_url }} | |
deployment-id: ${{ steps.deployment.outputs.deployment_id }} | |
state: 'success' | |
- name: Update deployment status (failure) β | |
if: failure() | |
uses: chrnorm/deployment-status@v2 | |
with: | |
token: ${{ secrets.BOT_TOKEN || secrets.GITHUB_TOKEN }} | |
environment-url: ${{ steps.deployment.outputs.environment_url }} | |
deployment-id: ${{ steps.deployment.outputs.deployment_id }} | |
state: 'failure' |