diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 207f488..fd8cf49 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,14 +1,14 @@ name: build -run-name: 🚀 Build +run-name: 🏗️ Build on: push: branches: - - main + - master - release/** pull_request: branches: - - main + - master - release/** permissions: @@ -19,7 +19,7 @@ concurrency: jobs: build: - name: 🚀 Build + name: 🏗️ Build runs-on: ubuntu-latest steps: - name: 🛎️ Checkout diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b7e92d2..e36b7e5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,23 +1,17 @@ name: deploy run-name: 🚀 Deploy + on: workflow_run: - workflows: ["build"] - branches: ["main", "release/*"] - types: + workflows: [build] + branches: [master] + types: - completed -env: - DEPLOY_PREVIEW: ${{ github.event.workflow_run.event == 'pull_request' }} - ARTIFACT_NAME: "build-artifact-${{ github.sha }}" - - - 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/master' }} name: 🚀 Deploy runs-on: ubuntu-latest environment: @@ -30,12 +24,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