Skip to content

Merge pull request #1 from AlanD20/develop #45

Merge pull request #1 from AlanD20/develop

Merge pull request #1 from AlanD20/develop #45

Workflow file for this run

name: deploy
on:
push:
branches: ["main"]
jobs:
lint-build:
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
version: 9
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
- uses: actions/checkout@v3
- name: Create env file
run: cp .env.example .env
- name: Install dependencies
run: pnpm install
- name: Build CSS
run: pnpm css:prod
- name: Run nextjs lint
run: pnpm lint
- name: Run eslint
run: pnpm eslint
- name: Build project
run: pnpm build
# deploy:
# needs: [ "lint-build" ]
# runs-on: ubuntu-latest
# steps:
# - name: Setup rsa keys
# run: |
# mkdir ~/.ssh
# echo "${{ secrets.PUBLIC_KEY }}" > ~/.ssh/authorized_keys
# chmod 700 ~/.ssh
# chmod 600 ~/.ssh/authorized_keys
# - uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.HOST }}
# username: ${{ secrets.USERNAME }}
# key: ${{ secrets.PRIVATE_KEY }}
# passphrase: ${{ secrets.PASSPHRASE }}
# port: ${{ secrets.PORT }}
# script: |
# bash ${{ secrets.DEPLOY_SCRIPT_PATH }} &> ${{ secrets.DEPLOY_LOG_PATH }}
# grep -E '\- \[x\]' ${{ secrets.DEPLOY_LOG_PATH }}