From 95f5cf68d228552033cb9790f9d911ceb376ebec Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Tue, 13 May 2025 19:57:45 -0400 Subject: [PATCH] Cleanup deploy script (#708) ## Description: - Remove the environment from the deploy action, to prevent github actions from automatically creating a second deployment. This is no longer needed because the relevant secrets have been moved up to the repository level. - Remove the PR comment, as this is now redundant. ![image](https://github.com/user-attachments/assets/e07fde04-9788-4a5e-9a94-01b0917c45d1) ## Please complete the following: - [x] I have added screenshots for all UI updates - [x] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced - [x] I understand that submitting code with bugs that could have been caught through manual testing blocks releases and new features for all contributors --------- Co-authored-by: Scott Anderson <662325+scottanderson@users.noreply.github.com> --- .github/workflows/ci.yml | 2 ++ .github/workflows/deploy.yml | 25 ------------------------- .github/workflows/eslint.yml | 3 ++- .github/workflows/prettier.yml | 3 ++- 4 files changed, 6 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e3954117..2135d4f75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,7 @@ name: ๐Ÿงช CI on: [push, pull_request] jobs: build: + name: Build runs-on: ubuntu-latest steps: - name: Checkout repository @@ -19,6 +20,7 @@ jobs: path: out/index.html retention-days: 1 test: + name: Test runs-on: ubuntu-latest steps: - name: Checkout repository diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 598879364..795c1910a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -48,14 +48,6 @@ jobs: || 'openfront.dev' }} runs-on: ubuntu-latest - environment: ${{ - github.event_name == 'push' - && (github.ref_name == 'main' && 'openfront.dev' - || format('{0}.openfront.dev', github.ref_name)) - || inputs.target_subdomain && format('{0}.{1}', inputs.target_subdomain, inputs.target_domain) - || inputs.target_domain - || 'openfront.dev' - }} env: DOMAIN: ${{ inputs.target_domain || 'openfront.dev' }} SUBDOMAIN: ${{ github.event_name == 'push' && github.ref_name || inputs.target_subdomain || 'main' }} @@ -147,23 +139,6 @@ jobs: done echo "Deployment started in ${SECONDS} seconds" >> $GITHUB_STEP_SUMMARY echo "::endgroup::" - - name: ๐Ÿš€ Notify PR - if: ${{ success() && github.event_name == 'push' }} - env: - BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref_name }} - run: | - set -euxo pipefail - if [ -z "${BRANCH}" ]; then - echo "Branch not found" - exit 1 - fi - echo "Checking for open PR from $BRANCH..." - pr_url=$(gh pr list --head "$BRANCH" --state open --json url -q '.[0].url') - if [ -z "$pr_url" ]; then - echo "No open PR found for branch $BRANCH" - exit 0 - fi - gh pr comment "$pr_url" --body "๐Ÿš€ Deployed ${GITHUB_SHA} to [$FQDN](https://$FQDN)." - name: โœ… Update deployment status if: success() uses: chrnorm/deployment-status@v2 diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 836b8284d..ea20779db 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -6,7 +6,8 @@ on: branches: [main] jobs: - check: + eslint: + name: Check runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 315b8031b..b600e34ef 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -6,7 +6,8 @@ on: branches: [main] jobs: - check: + prettier: + name: Check runs-on: ubuntu-latest steps: - uses: actions/checkout@v4