Merge pull request #1 from AlanD20/develop #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |