Skip to content

Commit

Permalink
deploy to regions in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
briskt committed Oct 30, 2024
1 parent 49cf3f3 commit ed79014
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 4 deletions.
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

0 comments on commit ed79014

Please sign in to comment.