Skip to content

Commit

Permalink
Merge pull request #54 from vesperfi/fix-deploy
Browse files Browse the repository at this point in the history
Fix deploy pt.2
  • Loading branch information
gndelia authored Nov 19, 2024
2 parents af37b5e + 817c28b commit 7f2cf62
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/aws-eb-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
NEXT_PUBLIC_NODE_URL: ${{ vars.NEXT_PUBLIC_NODE_URL }}
NODE_URL: ${{ secrets.NODE_URL }}
STAGE: ${{ vars.STAGE }}
timeout-minutes: 10
timeout-minutes: 30
12 changes: 1 addition & 11 deletions .github/workflows/js-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,4 @@ concurrency:

jobs:
run-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: npm ci
- run: npm run lint
- run: npm run format:check
- run: npm run deps:check
- run: npm test
uses: bloq/actions/.github/workflows/js-checks.yml@v1
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
"name": "vusd-dapp",
"version": "1.0.0",
"license": "MIT",
"author": "Gabriel Montes <gabriel@bloq.com>",
"author": {
"name": "Gabriel Montes",
"email": "<gabriel@bloq.com>"
},
"contributors": [
"Martin Bon Foster <martin.bonfoster@bloq.com>",
"leo <leo@bloq.com>",
Expand Down
18 changes: 9 additions & 9 deletions scripts/1-site
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ set -e
# shellcheck disable=SC1091
[ -f .env ] && . .env

CONTACT=${CONTACT:-$(whoami)}
REGION=${REGION:-us-east-2}
AWS_REGION=${AWS_REGION:-us-east-2}
CONTACT=${CONTACT:-$(jq -r '.author.name' package.json)}
STAGE=${STAGE:-staging}

VERSION=$(git rev-parse HEAD | cut -c-7)
Expand All @@ -33,33 +33,33 @@ function replace-symlinked-deps() {
function eb-init() {
eb init "$1" \
--platform "docker" \
--region "$REGION"
--region "$AWS_REGION"
}

function eb-list() {
eb list \
--region "$REGION" | { grep "$1" || true; }
--region "$AWS_REGION" | { grep "$1" || true; }
}

function eb-create() {
eb create "$1" \
--elb-type application \
--envvars "$2" \
--instance_type "$3" \
--region "$REGION" \
--region "$AWS_REGION" \
--tags Contact="$CONTACT",Service=vusd
}

function eb-status() {
eb status "$1" \
--region "$REGION" | { grep "Status: Ready" || true; }
--region "$AWS_REGION" | { grep "Status: Ready" || true; }
}

function eb-deploy() {
# shellcheck disable=SC2046
eb setenv $(echo "$2" | tr "," " ") \
--environment "$1" \
--region "$REGION" \
--region "$AWS_REGION" \
--timeout 20 &
PID=$!

Expand All @@ -80,7 +80,7 @@ function eb-deploy() {
done

eb deploy "$1" \
--region "$REGION" \
--region "$AWS_REGION" \
--timeout 20 &
PID=$!

Expand Down Expand Up @@ -122,7 +122,7 @@ if [ -n "$(echo "$CHANGED" | { grep vusd-site || true; })" ]; then
echo "Replacing local dependencies"
replace-symlinked-deps

echo "Initalizing site"
echo "Initializing site"
SITE_EB_APP_NAME=vusd-site
eb-init "$SITE_EB_APP_NAME"

Expand Down

0 comments on commit 7f2cf62

Please sign in to comment.