Skip to content

Instantly share code, notes, and snippets.

@destroyer22719
Created January 28, 2021 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save destroyer22719/dd9e03f4dcd00232977ab450dc33c970 to your computer and use it in GitHub Desktop.
Save destroyer22719/dd9e03f4dcd00232977ab450dc33c970 to your computer and use it in GitHub Desktop.
on:
push:
tags:
- 'v*.*.*'
jobs:
serverless-deploy-production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Install serverless CLI
run: npm install -g serverless
- name: Install npm dependencies
run: npm install
- name: set environment variables
run: |
touch .env
echo "API_KEY=${{secrets.API_KEY}}" >> .env
- name: deploy
run: |
serverless config credentials --provider aws --key ${{secrets.AWS_ACCESS_KEY_ID}} --secret ${{secrets.AWS_SECRET_ACCESS_KEY}}
serverless deploy --stage production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment