diff --git a/.github/workflows/fly.yml b/.github/workflows/fly.yml new file mode 100644 index 0000000..4d52582 --- /dev/null +++ b/.github/workflows/fly.yml @@ -0,0 +1,22 @@ +name: Deploy to Fly + +on: + push: + branches: ["main"] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Wait for other checks to succeed + uses: lewagon/wait-on-check-action@v1.3.3 + with: + ref: ${{ github.ref }} + running-workflow-name: deploy + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/checkout@v3 + - uses: superfly/flyctl-actions/setup-flyctl@master + - run: flyctl deploy --remote-only + env: + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} diff --git a/README.md b/README.md index f795023..e5bcd7c 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,4 @@ Listen to NEO LMS notifications from an email and forward it to a Discord webhoo Create an `.env` file and configure the corresponding environment variables. See: [`.env.example`](./.env.example) -A `fly.toml` file is included for deployment to [fly.io](https://fly.io/). +A [`fly.toml`](./fly.toml) file is included for deployment to [fly.io](https://fly.io/). diff --git a/fly.toml b/fly.toml new file mode 100644 index 0000000..fff6718 --- /dev/null +++ b/fly.toml @@ -0,0 +1,4 @@ +app = "iacdiscordnotifs" +primary_region = "hkg" + +[[services]]