Skip to content

Commit

Permalink
Merge pull request #368 from consensusnetworks/feature/users-web-cdk
Browse files Browse the repository at this point in the history
Add users and web CDK for deployment
  • Loading branch information
shanejearley committed Jul 7, 2023
2 parents 4197640 + 13461d8 commit 8a1d174
Show file tree
Hide file tree
Showing 159 changed files with 23,261 additions and 21,525 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
pull_request:
branches: [master, develop]

env:
PROJECT: casimir
STAGE: test
AWS_REGION: us-east-2

jobs:
test:
name: Test
Expand All @@ -14,6 +19,13 @@ jobs:
with:
submodules: 'recursive'

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Install and build all package dependencies
run: npm ci
env:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ jobs:
uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Install action dependencies
run: |
curl -sSf https://atlasgo.sh | sh
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
Expand All @@ -38,6 +42,9 @@ jobs:
- name: Deploy cdk infrastructure
run: npm run deploy:cdk

- name: Migrate users database
run: npm run migrations:users

- name: Slack the team
if: ${{ success() || failure() }}
uses: slackapi/slack-github-action@v1.23.0
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ jobs:
- name: Deploy cdk infrastructure
run: npm run deploy:cdk

- name: Migrate users database
run: npm run migrations:users

- name: Check out develop
uses: actions/checkout@v3
with:
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/sandbox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Reset to the latest file code in the develop branch before merging to develop
# Clean up your `Casimir${Stack}${Stage}` stacks from the AWS CloudFormation console after use
# If you want to use a different branch or stage name (not sandbox), edit line 7 or 11 accordingly
name: Push
on:
push:
branches: [sandbox] # Replace with your branch name

env:
PROJECT: casimir
STAGE: sandbox # Replace with your stage name
AWS_REGION: us-east-2

jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest

# Skip any pushes with commit flag '(skip deploy)'
# Comment out for testing
if: ${{ !contains(github.event.head_commit.message, '(skip deploy)') }}

steps:
- name: Check out the repo
uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Install action dependencies
run: |
curl -sSf https://atlasgo.sh | sh
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ env.AWS_REGION }}

- name: Install and build all package dependencies
run: npm ci
env:
PUBLIC_STAGE: ${{ env.STAGE }}

- name: Deploy cdk infrastructure
run: npm run deploy:cdk

- name: Migrate users database
run: npm run migrations:users
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ cdk-outputs.json
# Sensitive
**/**/secrets/*.json

services/crawler/.env
services/crawler/.env

.out
Loading

0 comments on commit 8a1d174

Please sign in to comment.