Skip to content

Deploy static content to Pages #11

Deploy static content to Pages

Deploy static content to Pages #11

name: Build and deploy Node.js app
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
# environment:
# name: "Production"
# url: TODO
env:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v4
- name: Set up Node.js version
uses: actions/setup-node@v3
with:
node-version: "18.x"
- run: npm ci
- name: build server
working-directory: ./server
run: |
npm install
npm run build --if-present
- name: build client
working-directory: ./client
run: |
npm install
npm run build:web --if-present
- run: ./node_modules/.bin/serverless deploy