From f084195b0d3d04326894812ba2505490b4ee996e Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Sat, 20 Jan 2024 13:57:53 +0000 Subject: [PATCH 1/7] fix: simplify --- .github/workflows/deploy.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b7e92d2..8f2b6b9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,17 +1,13 @@ name: deploy run-name: 🚀 Deploy + on: workflow_run: - workflows: ["build"] - branches: ["main", "release/*"] - types: - - completed - -env: - DEPLOY_PREVIEW: ${{ github.event.workflow_run.event == 'pull_request' }} - ARTIFACT_NAME: "build-artifact-${{ github.sha }}" - + workflows: + - build + types: + - completed jobs: deploy: @@ -30,12 +26,12 @@ jobs: id-token: write steps: - - name: Deploy to GitHub Pages + - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4 with: - artifact_name: ${{ env.ARTIFACT_NAME}} - preview: ${{ env.DEPLOY_PREVIEW }} + artifact_name: "build-artifact-${{ github.sha }}" + preview: false - name: Get the URL for the deployment run: echo "${{ steps.deployment.outputs.page_url }}" \ No newline at end of file From a99a3682c2213220f18ba39668635b6b83bf104f Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Sat, 20 Jan 2024 14:00:24 +0000 Subject: [PATCH 2/7] fix: syntax --- .github/workflows/deploy.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8f2b6b9..9c8a4fc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,9 +3,7 @@ run-name: 🚀 Deploy on: workflow_run: - workflows: - - build - + workflows: [build] types: - completed From 0b8b9154213020cf1203960ef0f22a4106144165 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Sat, 20 Jan 2024 14:02:10 +0000 Subject: [PATCH 3/7] fix: the build icons --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 207f488..206d847 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,5 @@ name: build -run-name: 🚀 Build +run-name: 🏗️ Build on: push: branches: @@ -19,7 +19,7 @@ concurrency: jobs: build: - name: 🚀 Build + name: 🏗️ Build runs-on: ubuntu-latest steps: - name: 🛎️ Checkout From 1d9c5ded1d68938bdc997e66628aa5e9c2a83fdc Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Sat, 20 Jan 2024 14:08:12 +0000 Subject: [PATCH 4/7] feat: deploy previous on non-main branches --- .github/workflows/deploy.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9c8a4fc..418c4f1 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -11,7 +11,6 @@ jobs: deploy: # Only run if the build was successful if: ${{ github.event.workflow_run.conclusion == 'success' }} - name: 🚀 Deploy runs-on: ubuntu-latest environment: @@ -29,7 +28,7 @@ jobs: uses: actions/deploy-pages@v4 with: artifact_name: "build-artifact-${{ github.sha }}" - preview: false + preview: ${{ github.ref != 'refs/heads/main' }} - name: Get the URL for the deployment run: echo "${{ steps.deployment.outputs.page_url }}" \ No newline at end of file From 3d86c1ed2dc7898a41a8dfcdffbb9131428a7482 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Sat, 20 Jan 2024 14:13:03 +0000 Subject: [PATCH 5/7] fix: pipeline --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 418c4f1..4c01282 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,7 +10,7 @@ on: jobs: deploy: # Only run if the build was successful - if: ${{ github.event.workflow_run.conclusion == 'success' }} + if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' }} name: 🚀 Deploy runs-on: ubuntu-latest environment: @@ -28,7 +28,7 @@ jobs: uses: actions/deploy-pages@v4 with: artifact_name: "build-artifact-${{ github.sha }}" - preview: ${{ github.ref != 'refs/heads/main' }} + preview: false - name: Get the URL for the deployment run: echo "${{ steps.deployment.outputs.page_url }}" \ No newline at end of file From 80a6da8c6ac75b619298224c4d82682341c2caf9 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Sat, 20 Jan 2024 14:19:05 +0000 Subject: [PATCH 6/7] fix: bladdy main --- .github/workflows/build.yml | 4 ++-- .github/workflows/deploy.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 206d847..fd8cf49 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,12 +3,12 @@ run-name: 🏗️ Build on: push: branches: - - main + - master - release/** pull_request: branches: - - main + - master - release/** permissions: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4c01282..9e20964 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -10,7 +10,7 @@ on: jobs: deploy: # Only run if the build was successful - if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' }} + if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/master' }} name: 🚀 Deploy runs-on: ubuntu-latest environment: From 5d57b8ee1e8225938950d8eefee56d2371c94ffb Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Sat, 20 Jan 2024 14:19:43 +0000 Subject: [PATCH 7/7] feat: deploy on master --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9e20964..e36b7e5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,6 +4,7 @@ run-name: 🚀 Deploy on: workflow_run: workflows: [build] + branches: [master] types: - completed