Bumped the memory to 1 GB to improve the startup performance #88
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 Serverless Application | |
concurrency: | |
group: deploy | |
on: | |
push: | |
branches: | |
- master | |
defaults: | |
run: | |
working-directory: ./ | |
jobs: | |
deploy-app: | |
environment: | |
name: production | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
cache: 'npm' | |
node-version-file: '.nvmrc' | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install Dependencies | |
run: npm ci --no-optional | |
- name: Deploy to production | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: ${{ vars.AWS_REGION }} | |
ACCOUNT_ID: ${{ vars.ACCOUNT_ID }} | |
HOSTED_ZONE_ID: ${{ vars.HOSTED_ZONE_ID }} | |
PARENT_DOMAIN: ${{ vars.PARENT_DOMAIN }} | |
run: npx sls deploy --stage=production | |
- name: Create Sentry release | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: ${{ vars.SENTRY_ORG }} | |
SENTRY_PROJECT: ${{ vars.SENTRY_PROJECT }} | |
with: | |
environment: production |