Skip to content

cicd: add setup pnpm #1

cicd: add setup pnpm

cicd: add setup pnpm #1

Workflow file for this run

name: Deployment
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 8
- name: Build Static Files
run: |
pnpm install
pnpm build
- name: Delete Past Version Files
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOYMENT_HOST }}
username: ${{ secrets.DEPLOYMENT_HOST_USERNAME }}
key: ${{ secrets.DEPLOYMENT_HOST_KEY }}
port: 22
script: |
rm -rf /var/www/html/*
- name: Send Files to Server
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOYMENT_HOST }}
username: ${{ secrets.DEPLOYMENT_HOST_USERNAME }}
key: ${{ secrets.DEPLOYMENT_HOST_KEY }}
port: 22
source: dist/
target: /var/www/html/