Fixed (#132) #456
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
paths: | |
- .github/workflows/main.yml | |
- mojacoder-backend/** | |
branches: | |
- master | |
name: Auto Deploy to AWS | |
jobs: | |
deploy: | |
name: Auto Deploy | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@master | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install Dependencies | |
working-directory: mojacoder-backend | |
run: | | |
yarn global add aws-cdk | |
yarn | |
cd lambda | |
for dir in ./*; do | |
cd $dir | |
yarn | |
cd .. | |
done | |
- name: Deploy to AWS | |
working-directory: mojacoder-backend | |
run: $(yarn global bin)/cdk deploy --require-approval never | |
env: | |
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |