Merge pull request #107 from AkseliManninen/dependabot/pip/backend/ht… #76
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 Backend and Frontend | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
# Job to deploy the backend | |
deploy_backend: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Flyctl | |
uses: superfly/flyctl-actions/setup-flyctl@master | |
- name: Deploy Backend to Fly.io | |
run: | | |
cd backend | |
flyctl deploy --app $FLY_APP_NAME --remote-only | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
FLY_APP_NAME: ${{ vars.FLY_BACKEND_APP_NAME }} | |
# Job to deploy the frontend | |
deploy_frontend: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Flyctl | |
uses: superfly/flyctl-actions/setup-flyctl@master | |
- name: Deploy Frontend to Fly.io | |
run: | | |
cd frontend | |
flyctl deploy --app $FLY_APP_NAME --remote-only | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
FLY_APP_NAME: ${{ vars.FLY_FRONTEND_APP_NAME }} |