This repository has been archived by the owner on Jul 15, 2024. It is now read-only.
Update deploy.yml #40
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 Next.js App | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup Pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 8.15.0 | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm test -- --run | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup Pnpm | |
uses: pnpm/[email protected] | |
with: | |
version: 8.15.0 | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm run build | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Use the environment secret | |
run: echo ${{ secrets.VPS_HOST }} | |
- name: Use the default environment variables | |
run: echo $GITHUB_BASE_RE | |
# - name: Deploy to VPS | |
# uses: appleboy/ssh-action@master | |
# with: | |
# host: ${{ secrets.VPS_HOST }} | |
# username: ${{ secrets.VPS_USER }} | |
# key: ${{ secrets.VPS_SSH_KEY }} | |
# port: ${{ secrets.VPS_PORT }} | |
# script: | | |
# git clone --branch ${{ github.base_ref }} --depth 1 https://github.com/${{ github.repository }} /home/nextjs-large-file-upload_${{ github.sha }} | |
# cd /home/nextjs-large-file-upload_${{ github.sha }} | |
# pnpm install --frozen-lockfile | |
# pnpm run build | |
# pm2 start | |
# pm2 ls | |
# pm2 logs large-file-upload --nostream |