Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/build-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down