Skip to content

feat: 评分细则 (#120) #113

feat: 评分细则 (#120)

feat: 评分细则 (#120) #113

Workflow file for this run

name: CICD
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Install dependencies with pnpm
run: pnpm install
- name: Run build task
env:
CI: false
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
GENERATE_SOURCEMAP: false
run: pnpm build
- name: Generating tarball
run: cd build && tar -czf ../artifact.tar.gz .
- name: Deploy to Server
uses: easingthemes/ssh-deploy@v5.0.0
with:
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
SOURCE: artifact.tar.gz
TARGET: /www/temp
SCRIPT_AFTER: |
cd /www/temp
tar -xf artifact.tar.gz
rm artifact.tar.gz
cd ../
rm -rf ./approve.sast.fun.backup/*
mv ./approve.sast.fun/* ./approve.sast.fun.backup/
mv ./temp/* ./approve.sast.fun/