Mailer Somewhat Ready #25
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: deploy to lambda | |
on: | |
push: | |
branches: main | |
jobs: | |
lambda-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Setup node environment | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: Set environment variables | |
run: | | |
echo "EXPLARA_EMAIL=${{ secrets.EXPLARA_EMAIL }}" >> $GITHUB_ENV | |
echo "EXPLARA_PASSWORD=${{ secrets.EXPLARA_PASSWORD }}" >> $GITHUB_ENV | |
echo "MAILER_EMAIL=${{ secrets.MAILER_EMAIL }}" >> $GITHUB_ENV | |
echo "MAILER_PASSWORD=${{ secrets.MAILER_PASSWORD }}" >> $GITHUB_ENV | |
- name: Install serverless globally | |
run: npm install -g serverless | |
- name: Configure serverless authentication | |
run: sls config credentials --provider aws --key ${{ secrets.AWS_ACCESS_KEY_ID }} --secret ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Install npm dependencies | |
run: npm ci | |
- name: Deploy lambda function | |
run: sls deploy |