diff --git a/.github/workflows/branch-preview.yml b/.github/workflows/branch-preview.yml new file mode 100644 index 0000000..fb225fe --- /dev/null +++ b/.github/workflows/branch-preview.yml @@ -0,0 +1,29 @@ +name: 🤖 Branch Preview + +concurrency: + group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: [main] + +jobs: + deploy: + name: 🚀 Deploy Branch Preview + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: forge-42/fly-deploy@v1.0.0-rc.2 + id: deploy + env: + FLY_ORG: ${{ vars.FLY_ORG }} + FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} + FLY_REGION: ${{ vars.FLY_REGION }} + with: + app_name: ${{github.event.repository.name}}-${{ github.ref_name }} + env_vars: | + APP_ENV=staging + GITHUB_OWNER=${{github.repository_owner}} + GITHUB_REPO=${{github.event.repository.name}} + GITHUB_REPO_URL=https://github.com/${{ github.repository }} diff --git a/.github/workflows/pr-close.yml b/.github/workflows/pr-close.yml index 1f8f72a..f7c7221 100644 --- a/.github/workflows/pr-close.yml +++ b/.github/workflows/pr-close.yml @@ -24,4 +24,4 @@ jobs: FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} FLY_ORG: ${{ vars.FLY_ORG }} with: - app_name: ${{ env.FLY_ORG }}-${{ github.event.number }} + app_name: ${{github.event.repository.name}}-${{ github.event.number }} diff --git a/fly.toml b/fly.toml index c9c5d15..1780e86 100644 --- a/fly.toml +++ b/fly.toml @@ -1,4 +1,4 @@ -# fly.toml app configuration file generated for docs-template-test on 2025-09-12T12:27:12+02:00 +# fly.toml app configuration file generated for docs-template-test on 2025-09-19T15:08:49+02:00 # # See https://fly.io/docs/reference/configuration/ for information about how to use this file. #