chore: fix readme #6
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: Test and deploy | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Use Node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
- name: Install dependencies | |
run: yarn | |
- name: Run tests | |
run: yarn test | |
- name: Deploy | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # change 'main' to your branch name | |
run: yarn deploy --verbose --stage production # OR, if using custom domain: yarn serverless create_domain --stage production && yarn deploy --verbose --stage production | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
CI: true |