Add search and meilisearch deploys #6
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.io | |
on: | |
push: | |
branches: | |
- main | |
- stable | |
# Ensure only one deployment workflow runs at a time | |
concurrency: | |
group: "deploy" | |
cancel-in-progress: false | |
jobs: | |
deploy_staging: | |
name: Deploy apps to Staging | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Flyctl | |
uses: superfly/flyctl-actions/setup-flyctl@master | |
# Deploy Database (Pocketbase) | |
- name: Deploy Database | |
working-directory: db | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }} | |
run: flyctl deploy --remote-only | |
# Deploy Backend | |
- name: Deploy Backend | |
working-directory: python-backend | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }} | |
run: flyctl deploy --remote-only | |
# Deploy Meilisearch | |
- name: Deploy Meilisearch | |
working-directory: meilisearch | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }} | |
run: flyctl deploy --remote-only | |
# Deploy Search | |
- name: Deploy Search | |
working-directory: search | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }} | |
run: flyctl deploy --remote-only | |
# Deploy Frontend | |
- name: Deploy Frontend | |
working-directory: frontend | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }} | |
run: flyctl deploy --remote-only | |
deploy_production: | |
name: Deploy apps to Production | |
if: github.ref == 'refs/heads/stable' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Flyctl | |
uses: superfly/flyctl-actions/setup-flyctl@master | |
# Deploy Database (Pocketbase) | |
- name: Deploy Database | |
working-directory: db | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }} | |
run: flyctl deploy --config fly.prod.toml --remote-only | |
# Deploy Backend | |
- name: Deploy Backend | |
working-directory: python-backend | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }} | |
run: flyctl deploy --config fly.prod.toml --remote-only | |
# Deploy Meilisearch | |
- name: Deploy Meilisearch | |
working-directory: meilisearch | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }} | |
run: flyctl deploy --config fly.prod.toml --remote-only | |
# Deploy Search | |
- name: Deploy Search | |
working-directory: search | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }} | |
run: flyctl deploy --config fly.prod.toml --remote-only | |
# Deploy Frontend | |
- name: Deploy Frontend | |
working-directory: frontend | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_TOKEN }} | |
run: flyctl deploy --config fly.prod.toml --remote-only |