Build magnet-convos from perl-irc/convos fork #72
This file contains hidden or 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
| # ABOUTME: GitHub Actions workflow for automated Fly.io deployment | |
| # ABOUTME: Deploys hub, anycast leaves, and services on push to main, then runs smoke tests | |
| name: Deploy to Fly.io | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
| jobs: | |
| deploy: | |
| name: Deploy Applications | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' | |
| strategy: | |
| max-parallel: 1 | |
| matrix: | |
| include: | |
| - app: magnet-9rl | |
| config: servers/magnet-9rl/fly.toml | |
| - app: magnet-irc | |
| config: servers/magnet-irc/fly.toml | |
| - app: magnet-atheme | |
| config: servers/magnet-atheme/fly.toml | |
| - app: magnet-convos | |
| config: servers/magnet-convos/fly.toml | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: superfly/flyctl-actions/setup-flyctl@master | |
| - name: Deploy ${{ matrix.app }} | |
| run: flyctl deploy --config ${{ matrix.config }} --app ${{ matrix.app }} --remote-only | |
| smoke-test: | |
| name: Post-Deploy Smoke Tests | |
| runs-on: ubuntu-latest | |
| needs: deploy | |
| container: perl:stable-slim | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Wait for services to stabilize | |
| run: sleep 30 | |
| - name: Run smoke tests | |
| env: | |
| SMOKE_TEST: 1 | |
| IRC_LEAF_HOST: magnet-irc.fly.dev | |
| run: prove -v t/01-smoke.t |