diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml index ac9426977..0d48ecdc0 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build-main.yml @@ -3,10 +3,10 @@ permissions: id-token: write contents: read on: -# push: -# branches: -# - master - workflow_dispatch: + push: + branches: + - master +# workflow_dispatch: env: AWS_REGION: "us-east-1" diff --git a/.github/workflows/build-preview.yml b/.github/workflows/build-preview.yml index 476892176..e0e7b11a6 100644 --- a/.github/workflows/build-preview.yml +++ b/.github/workflows/build-preview.yml @@ -4,27 +4,27 @@ permissions: contents: read pull-requests: write on: - workflow_dispatch: - inputs: - pr: - description: "Which Pull Request to publish" - required: true - #pull_request: - # types: [opened, reopened, synchronize, closed] + #workflow_dispatch: + # inputs: + # pr: + # description: "Which Pull Request to publish" + # required: true + pull_request: + types: [opened, reopened, synchronize, closed] env: AWS_REGION: "us-east-1" PREVIEW_DOMAIN: "dyokhwe5tb1zx.cloudfront.net" - PR_NUMBER: ${{ github.event.inputs.pr }} # ${{ github.event.pull_request.number }} + PR_NUMBER: ${{ github.event.pull_request.number }} # ${{ github.event.inputs.pr }} concurrency: - group: preview-${{ github.event.inputs.pr }} + group: preview-${{ github.event.pull_request.number }} cancel-in-progress: true jobs: deploy-preview: # Fork PRs don't get AWS credentials, so skip them explicitly rather than let the job fail - # if: github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository + if: github.event.action != 'closed' && github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest steps: - name: Git clone the repository @@ -65,7 +65,7 @@ jobs: [https://${{ env.PREVIEW_DOMAIN }}/pr-${{ env.PR_NUMBER }}/](https://${{ env.PREVIEW_DOMAIN }}/pr-${{ env.PR_NUMBER }}/) cleanup-preview: - # if: github.event.action == 'closed' && github.event.pull_request.head.repo.full_name == github.repository + if: github.event.action == 'closed' && github.event.pull_request.head.repo.full_name == github.repository runs-on: ubuntu-latest steps: - name: Configure AWS credentials