ci: add secrets, generate prisma db

This commit is contained in:
Nicola Zambello 2022-02-21 16:04:51 +01:00
parent 73f2f08aef
commit 3017ec7126

View file

@ -16,13 +16,17 @@ jobs:
- name: ⬇️ Checkout repo - name: ⬇️ Checkout repo
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Apply secret env - name: 🔐 Apply secrets env
run: | run: |
echo 'DATABASE_URL="file:./prod.db"' > .env echo 'PORT=5001' > .env
echo 'DATABASE_URL="file:./prod.db"' >> .env
echo 'SESSION_SECRET="${{secrets.SESSION_SECRET}}"' >> .env echo 'SESSION_SECRET="${{secrets.SESSION_SECRET}}"' >> .env
- name: ⚒ Install dependencies and build - name: ⚒ Install and build
run: yarn install && yarn build run: |
yarn install
yarn build
yarn prisma db push
- name: 🚀 Deploy - name: 🚀 Deploy
run: pm2 startOrRestart ecosystem.config.js run: pm2 startOrRestart ecosystem.config.js