Skip to content

Merge pull request #75 from pizza-to-the-polls/bulk-uploading-lessons #118

Merge pull request #75 from pizza-to-the-polls/bulk-uploading-lessons

Merge pull request #75 from pizza-to-the-polls/bulk-uploading-lessons #118

Workflow file for this run

name: Deploy
on:
push:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 20
- name: npm install dependencies
run: npm install
- name: run prettier
run: npm run prettier
- name: run tslint
run: npm run lint
- name: run tests
run: npm run test
env:
SS_AUTH_ID: ${{ secrets.SS_AUTH_ID }}
SS_AUTH_TOKEN: ${{ secrets.SS_AUTH_TOKEN }}
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_USERNAME: postgres
build:
runs-on: ubuntu-latest
needs: test
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 20
- name: npm install dependencies
run: npm install
- name: create ormconfig.json
run: echo $ORMCONFIG_JSON > $GITHUB_WORKSPACE/ormconfig.json
env:
ORMCONFIG_JSON: ${{ secrets.ORMCONFIG_JSON }}
- name: deploy to aws
uses: serverless/github-action@v1.53.0
with:
args: deploy --stage prod
env:
SS_AUTH_ID: ${{ secrets.SS_AUTH_ID }}
SS_AUTH_TOKEN: ${{ secrets.SS_AUTH_TOKEN }}
ZAP_NEW_REPORT: ${{ secrets.ZAP_NEW_REPORT }}
ZAP_NEW_LOCATION: ${{ secrets.ZAP_NEW_LOCATION }}
ZAP_NEW_ORDER: ${{ secrets.ZAP_NEW_ORDER }}
ZAP_NEW_UPLOAD: ${{ secrets.ZAP_NEW_UPLOAD }}
ZAP_NEW_TRUCK: ${{ secrets.ZAP_NEW_TRUCK }}
ZAP_SKIP_REPORT: ${{ secrets.ZAP_SKIP_REPORT }}
ZAP_TRUCK_REPORT: ${{ secrets.ZAP_TRUCK_REPORT }}
ZAP_ORDER_REPORT: ${{ secrets.ZAP_ORDER_REPORT }}
ZAP_CANCEL_ORDER_REPORT: ${{ secrets.ZAP_CANCEL_ORDER_REPORT }}
GOOGLE_MAPS_KEY: ${{ secrets.GOOGLE_MAPS_KEY }}
STATIC_SITE: 'https://polls.pizza'
BUGSNAG_KEY: ${{ secrets.BUGSNAG_KEY }}
ALLOWED_ORIGINS: polls.pizza
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_KEY }}
STRIPE_PRODUCT_ID: ${{ secrets.STRIPE_PRODUCT_ID }}
STRIPE_SECRET_WH: ${{ secrets.STRIPE_WH }}
MAILGUN_API_KEY: ${{ secrets.MAILGUN_API_KEY }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
- name: sync schema
run: npm run schema:sync