Update dollar value #52
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: Backend Pipeline | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'backend/**' | |
- '.github/workflows/backend.yml' | |
defaults: | |
run: | |
working-directory: ./backend | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
node-version: '14' | |
- name: Restore npm cache | |
uses: actions/[email protected] | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm ci | |
- name: Deploy backend | |
if: github.ref == 'refs/heads/main' | |
run: npx sls deploy --stage=prod | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }} | |
MONGO_URI: ${{ secrets.MONGO_URI }} | |
NODE_ENV: ${{ secrets.NODE_ENV }} | |
SLS_DEBUG: '*' |