mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 11:30:43 +00:00
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.  ## 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>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,7 +6,8 @@ on:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
eslint:
|
||||
name: Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -6,7 +6,8 @@ on:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
check:
|
||||
prettier:
|
||||
name: Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user