Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy to regions in parallel #159

Merged
merged 1 commit into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* @silinternational/developers
*.tf @silinternational/tf-devs
*.js @silinternational/js-devs
29 changes: 29 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
paste_backlog_issue_link_here

---

### Added
-

### Changed
-

### Deprecated
-

### Removed
-

### Fixed
-

### Security
-

---

### PR Checklist
- [ ] Put version number in PR title (if merge to main, e.g. `Release x.y.z - Summary of changes`)
- [ ] Documentation (README, RAML/OpenAPI, etc.)
- [ ] Unit tests created or updated

29 changes: 25 additions & 4 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

jobs:
test_and_deploy:
name: Test and Deploy
test:
runs-on: ubuntu-latest
timeout-minutes: ${{ fromJSON(vars.DEFAULT_JOB_TIMEOUT_MINUTES) }}
steps:
Expand All @@ -28,11 +27,33 @@ jobs:
npm test
serverless --version
serverless info --conceal

deploy_us_east_1:
runs-on: ubuntu-latest
timeout-minutes: ${{ fromJSON(vars.DEFAULT_JOB_TIMEOUT_MINUTES) }}
needs: test
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- if: github.ref_name == 'develop'
run: serverless deploy --verbose --stage dev --region us-east-1
- if: github.ref_name == 'develop'
run: serverless deploy --verbose --stage dev --region us-west-2
- if: github.ref_name == 'main'
run: serverless deploy --verbose --stage prod --region us-east-1

deploy_us_west_2:
runs-on: ubuntu-latest
timeout-minutes: ${{ fromJSON(vars.DEFAULT_JOB_TIMEOUT_MINUTES) }}
needs: test
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- if: github.ref_name == 'develop'
run: serverless deploy --verbose --stage dev --region us-west-2
- if: github.ref_name == 'main'
run: serverless deploy --verbose --stage prod --region us-west-2