Skip to content

Commit

Permalink
Ensure staging-cd is defined correctly in workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
aloftus23 committed Jan 3, 2025
1 parent 9f73f2e commit 21a28ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Restore npm cache
uses: actions/cache@v3
with:
Expand All @@ -105,14 +109,14 @@ jobs:
run: npm ci

- name: Ensure domain exists
run: npx sls create_domain --stage=staging
run: npx sls create_domain --stage=staging-cd
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SLS_DEBUG: '*'

- name: Deploy backend
run: npx sls deploy --stage=staging
run: npx sls deploy --stage=staging-cd
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand All @@ -127,7 +131,7 @@ jobs:

- name: Run syncdb
run: |
aws lambda invoke --function-name crossfeed-staging-syncdb \
aws lambda invoke --function-name crossfeed-staging-cd-syncdb \
--region us-east-1 /dev/stdout
working-directory: backend
env:
Expand All @@ -136,7 +140,7 @@ jobs:

- name: Run syncmdl
run: |
aws lambda invoke --function-name crossfeed-staging-syncmdl \
aws lambda invoke --function-name crossfeed-staging-cd-syncmdl \
--region us-east-1 /dev/stdout
working-directory: backend
env:
Expand Down Expand Up @@ -175,7 +179,7 @@ jobs:
SLS_DEBUG: '*'

- name: Deploy backend
run: npx sls deploy --stage=integration --force
run: npx sls deploy --stage=integration
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ jobs:
npm run build
cp -R public ../frontend/docs-build
- name: Build Staging
run: cp stage.env .env && npm run build
run: cp stage-cd.env .env && npm run build
- name: Deploy Staging
run: npx sls deploy --stage=staging
run: npx sls deploy --stage=staging-cd
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down

0 comments on commit 21a28ae

Please sign in to comment.