diff options
Diffstat (limited to 'official-site/deploy.sh')
| m--------- | official-site | 0 | ||||
| -rwxr-xr-x | official-site/deploy.sh | 41 |
2 files changed, 0 insertions, 41 deletions
diff --git a/official-site b/official-site new file mode 160000 +Subproject bb6b424e91001ba6f9309162af90613a0229929 diff --git a/official-site/deploy.sh b/official-site/deploy.sh deleted file mode 100755 index 32574e0..0000000 --- a/official-site/deploy.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail - -REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)" -[ -f "$REPO_ROOT/.env" ] && set -a && source "$REPO_ROOT/.env" && set +a - -AWS_CLI="${AWS_CLI:-/tmp/awscli/aws/dist/aws}" -APP_ID="d33773t2lyrxkx" -BRANCH="main" -REGION="${AWS_DEFAULT_REGION:-ap-northeast-1}" - -echo "Starting Amplify build: app=$APP_ID branch=$BRANCH" -JOB=$("$AWS_CLI" amplify start-job \ - --app-id "$APP_ID" \ - --branch-name "$BRANCH" \ - --job-type RELEASE \ - --region "$REGION" \ - --output json) - -JOB_ID=$(echo "$JOB" | python3 -c "import json,sys; print(json.load(sys.stdin)['jobSummary']['jobId'])") -echo "Job started: $JOB_ID" -echo "Console: https://ap-northeast-1.console.aws.amazon.com/amplify/apps/$APP_ID/branches/$BRANCH/deployments/$JOB_ID" - -echo "Waiting for build to complete..." -while true; do - STATUS=$("$AWS_CLI" amplify get-job \ - --app-id "$APP_ID" \ - --branch-name "$BRANCH" \ - --job-id "$JOB_ID" \ - --region "$REGION" \ - --output json | python3 -c "import json,sys; print(json.load(sys.stdin)['job']['summary']['status'])") - echo " Status: $STATUS" - if [[ "$STATUS" == "SUCCEED" ]]; then - echo "Build succeeded! https://www.mosquit.one" - break - elif [[ "$STATUS" == "FAILED" || "$STATUS" == "CANCELLED" ]]; then - echo "Build $STATUS" - exit 1 - fi - sleep 15 -done |
