Skip to content

Fix typing issue

Fix typing issue #2

Workflow file for this run

name: Deploy πŸš€
on:
push:
branches: [main]
workflow_dispatch:
jobs:
deploy:
name: Do it πŸ’ͺ
runs-on: ubuntu-latest
steps:
- name: Checkout latest code 🚚
uses: actions/checkout@v3
- name: Restore cache πŸ“€
uses: actions/cache@v3
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Install dependencies ⏳
run: npm ci
- name: Build website πŸ‘·β€β™€οΈ
run: npm run build
- name: Copy prisma folder πŸ’Ύ
run: cp -R prisma/ .next/standalone/prisma/
- name: Copy public folder 🚝
run: cp -R public/ .next/standalone/public/
- name: Copy static folder πŸ—‚
run: cp -R .next/static/ .next/standalone/.next/static/
- name: Install SSH Key πŸ”‘
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: "just-a-placeholder-so-we-dont-get-errors"
- name: Adding Known Hosts πŸ’Ύ
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Deploy with rsync πŸ’¨
run: rsync -avz --delete .next/standalone/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/var/www/issue.robvermeer.nl/ --exclude=.env.local --exclude=database/
# - name: Migrate database πŸͺ€
# run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd /var/www/issue.robvermeer.nl/ && dotenv -e .env.local prisma migrate deploy"
# - name: Restart server 🏁
# run: ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "cd /var/www/issue.robvermeer.nl/ && pm2 reload issue"