Skip to content

Choose package.json location #3

Choose package.json location

Choose package.json location #3

Workflow file for this run

# github action to deploy subscriber sls service to prod
name: Deploy subscriber service to prod
on:
push:
branches:
- main
- gh-actions
paths:
- subscriber/**
- .github/workflows/sls-subscriber.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 serverless
- name: Install dependencies
run: cd subscriber && npm install
- name: Package and deploy
run: |
serverless deploy \
--region ${{ vars.AWS_REGION }} \
--org ${{ vars.SLSORG }} \
--app ${{ vars.SLSAPP }} \
--stage ${{ vars.SLSSTAGE }} \
--verbose