Skip to content

Commit

Permalink
Update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejearley committed Jun 11, 2022
1 parent 2b9dc0f commit 0cc578f
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:
runs-on: ubuntu-latest

# Skip any pushes with commit flag '(skip deploy)'
if: ${{ !contains(github.event.head_commit.message, '(skip deploy)') }}
if: ${{ github.actor != 'nektos/act' }}
# if: ${{ !contains(github.event.head_commit.message, '(skip deploy)') }}

steps:
- uses: actions/checkout@v2
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,22 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Build and deploy stacks
- name: Install dependencies
run: npm ci

- name: Build common lib
run: npm run build
working-directory: common/lib

- name: Build website app
run: npm run build
working-directory: apps/website

- name: Build users service
run: npm run build
working-directory: services/users

- name: Deploy cdk infrastructure
run: npm run deploy

- name: Build and deploy email templates
Expand Down
18 changes: 17 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
if: ${{ github.actor != 'nektos/act' }}

steps:
- name: Check out the repo
Expand All @@ -33,7 +34,22 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Build and deploy website
- name: Install dependencies
run: npm ci

- name: Build common lib
run: npm run build
working-directory: common/lib

- name: Build website app
run: npm run build
working-directory: apps/website

- name: Build users service
run: npm run build
working-directory: services/users

- name: Deploy cdk infrastructure
run: npm run deploy

- name: Build and deploy email templates
Expand Down
1 change: 1 addition & 0 deletions apps/website/src/pages/index/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { ArrowRightIcon } from '@heroicons/vue/solid'
Non-custodial cross chain staking platform with high performing validators and nodes
</span>

<!-- Add form with submit and post to localhost:4000/api/users/signup and email in body -->
<div class="mt-10 grid grid-cols-5 gap-2 ">
<input
type="text"
Expand Down
1 change: 0 additions & 1 deletion infrastructure/cdk/lib/users/users-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export class UsersStack extends Stack {
name: `${project}${service}PinpointApp${stage}`
})

// Todo set path alias for services
const lambdaHandler = new lambda.Function(this, `${project}${service}Api${stage}`, {
runtime: lambda.Runtime.NODEJS_14_X,
handler: 'index.handler',
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions scripts/cdk/deploy
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ else
echo "🚀 Deploying CDK app"
OUT_DIR=$(pwd)/cdk-outputs.json
cd $DIRECTORY
npm install
npm run cdk bootstrap
npm run cdk synth
npm run cdk diff
npm run cdk deploy -- --all --require-approval never --outputs-file $OUT_DIR
npx cdk bootstrap
npx cdk synth
npx cdk diff
npx cdk deploy -- --all --require-approval never --outputs-file $OUT_DIR
fi


Expand Down
2 changes: 1 addition & 1 deletion scripts/cdk/destroy
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ if [ -z "$(ls -A $DIRECTORY)" ]; then
else
cd $DIRECTORY
npm install
npm run cdk destroy -- --force --all --require-approval never
npx cdk destroy -- --force --all --require-approval never
fi
2 changes: 1 addition & 1 deletion scripts/cdk/mock
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ else

# Deploy CDK app
npm install
npm run cdk synth
npx cdk synth
sam local start-api -t ./cdk.out/${project}${service}Stack${stage}.template.json

fi

0 comments on commit 0cc578f

Please sign in to comment.