Skip to content

FEAT: Deployment status (#23) #5

FEAT: Deployment status (#23)

FEAT: Deployment status (#23) #5

Workflow file for this run

name: πŸš€ Deploy to Fly
on:
workflow_dispatch:
push:
branches:
- main
jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
concurrency: deploy-group
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v4
- name: Setup Fly 🧰
uses: superfly/flyctl-actions/setup-flyctl@master
- name: Deploy to Fly.io πŸ›©οΈ
id: deploy
run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }}
- name: Create GitHub Deployment Status 🚒
id: create_deployment
uses: peter-evans/create-or-update-deployment@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
environment: production
environment_url: https://api.web-check.xyz
description: "Deploying the application to Fly.io"
transient_environment: false
auto_inactive: true
- name: Update GitHub Deployment Status to Success βœ…
if: success()
uses: octokit/request-action@v2
with:
route: POST /repos/${{ github.repository }}/deployments/${{ steps.create_deployment.outputs.deployment_id }}/statuses
token: ${{ secrets.GITHUB_TOKEN }}
state: success
environment_url: https://api.web-check.xyz
description: 'βœ… Deployment successful! πŸ₯³'
- name: Update GitHub Deployment Status to Failure 🚫
if: failure()
uses: octokit/request-action@v2
with:
route: POST /repos/${{ github.repository }}/deployments/${{ steps.create_deployment.outputs.deployment_id }}/statuses
token: ${{ secrets.GITHUB_TOKEN }}
state: failure
environment_url: https://api.web-check.xyz
description: '🚫 Deployment failed πŸ˜₯'