Read ADMIN_EMAIL from env #4
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
# github action to deploy forwarder sls service to prod | |
name: Deploy forwarder service to prod | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- forwarder/** | |
- .github/workflows/sls-forwarder.yaml | |
jobs: | |
deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ vars.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ vars.AWS_REGION }} | |
- name: Install Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '18.x' | |
- name: Install serverless framework | |
run: npm install -g [email protected] | |
- name: Install node dependencies | |
working-directory: forwarder | |
run: npm ci | |
- name: Install python3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Package and deploy | |
working-directory: forwarder | |
run: | | |
serverless deploy \ | |
--region ${{ vars.AWS_REGION }} \ | |
--stage ${{ vars.SLSSTAGE }} \ | |
--verbose | |
env: | |
ADMIN_EMAIL: ${{ vars.ADMIN_EMAIL }} |