From cd09c0d4dd319b39238d7a1f74427db96ee6f15c Mon Sep 17 00:00:00 2001 From: Gabriel Fontes Date: Thu, 18 Jan 2024 08:49:30 -0300 Subject: [PATCH] tentar fazer funcionar em PRs --- .github/workflows/fix-nbsp.yml | 3 --- .github/workflows/staging.yml | 13 +++++++------ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/fix-nbsp.yml b/.github/workflows/fix-nbsp.yml index a3035c98..c9416264 100644 --- a/.github/workflows/fix-nbsp.yml +++ b/.github/workflows/fix-nbsp.yml @@ -1,12 +1,9 @@ name: "Buscar e remover Non-breaking Spaces" on: - pull_request: push: jobs: fix: runs-on: ubuntu-latest - # Não rodar em forks, já que forks não tem acesso a secrets. - if: ${{ !github.event.pull_request.head.repo.fork }} steps: - name: Autenticar bot uses: tibdex/github-app-token@v1 diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 3964e04f..1cc9545d 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -1,11 +1,11 @@ name: "Deploy to staging" on: - push: - branches-ignore: - - main + pull_request: jobs: build: runs-on: ubuntu-latest + # Não rodar em forks, já que forks não tem acesso a secrets. + if: ${{ !github.event.pull_request.head.repo.fork }} steps: - uses: actions/checkout@v3 - uses: determinatesystems/nix-installer-action@v4 @@ -42,10 +42,11 @@ jobs: unlink '/srv/staging/${{ github.ref_name }}' || true ln -s '${{ steps.build.outputs.out-path }}/public' '/srv/staging/${{ github.ref_name }}' EOF - - name: Comentar commit - uses: peter-evans/commit-comment@v3 + - name: Comentar PR + uses: thollander/actions-comment-pull-request@v2 with: token: ${{ steps.generate-token.outputs.token }} - body: | + message: | Esse commit pode ser visualizado em: https://staging.gelos.club/${{ github.ref_name }} + comment_tag: preview_stager