[PR] Node 18 and Testing yml (#36) #8
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
name: Lambda Common Layer Deployment | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
deploy-sam: | |
name: Deploy Serveless API | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/setup-python@v2 | |
- uses: aws-actions/setup-sam@v2 | |
- 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: us-west-2 | |
- name: Set-up Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 18 | |
- name: npm install | |
run: npm install --prefix=dependencies/nodejs install --loglevel=verbose | |
- name: env encrpytion | |
run: openssl aes-256-cbc -K ${{ secrets.ENV_KEY }} -iv ${{ secrets.ENV_IV }} -in .env.enc -out ./dependencies/nodejs/.env -d | |
- name: Deploy | |
run: | | |
sam validate | |
sam package --template-file template.yaml --s3-bucket osu-so-serverless-builds --output-template-file packaged.yaml | |
sam deploy --template-file ./packaged.yaml --stack-name auth --capabilities CAPABILITY_IAM --no-confirm-changeset --no-fail-on-empty-changeset |