From c733ce31f0324e797faf410b01583dd7699524ff Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 21 Jun 2023 04:03:16 +0200 Subject: [PATCH 1/2] ci: run on push --- .../workflows/{deploy_pr_preview.yml => deploy.yml} | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) rename .github/workflows/{deploy_pr_preview.yml => deploy.yml} (84%) diff --git a/.github/workflows/deploy_pr_preview.yml b/.github/workflows/deploy.yml similarity index 84% rename from .github/workflows/deploy_pr_preview.yml rename to .github/workflows/deploy.yml index d245f26..4a48798 100644 --- a/.github/workflows/deploy_pr_preview.yml +++ b/.github/workflows/deploy.yml @@ -1,6 +1,10 @@ -name: Deploy PR Preview +name: Deploy -on: pull_request +on: + pull_request: + push: + branches: + - main jobs: deploy: @@ -9,7 +13,7 @@ jobs: contents: read deployments: write pull-requests: write - name: Deploy PR Preview + name: Deploy steps: - name: Checkout uses: actions/checkout@v3 @@ -24,6 +28,7 @@ jobs: id: publish - name: Comment deployment URL + if: ${{ github.event_name == 'pull_request' }} uses: thollander/actions-comment-pull-request@v2 with: GITHUB_TOKEN: ${{ secrets.PULL_REQUESTS_WRITE }} From 496ec70bd176700645b8e0511652229cd5f66301 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Wed, 21 Jun 2023 04:08:09 +0200 Subject: [PATCH 2/2] ci: use better comment message --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4a48798..76fdefb 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,4 +32,4 @@ jobs: uses: thollander/actions-comment-pull-request@v2 with: GITHUB_TOKEN: ${{ secrets.PULL_REQUESTS_WRITE }} - message: ${{ steps.publish.outputs.alias }} + message: Deployed at ${{ steps.publish.outputs.alias }}.