diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 2da0f67..a72a499 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,8 +13,19 @@ jobs: name: Deploy runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: superfly/flyctl-actions/setup-flyctl@master - - run: flyctl deploy --app fullstack-reason-react-demo --remote-only + - name: Checkout repo + uses: actions/checkout@v3 + + - name: Read app name + uses: SebRollen/toml-action@v1.0.2 + id: app_name + with: + file: "fly.toml" + field: "app" + + - name: Deploy + uses: superfly/flyctl-actions@1.3 + with: + args: "deploy --remote-only --app ${{ steps.app_name.outputs.value }}" env: FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}