Skip to content

Commit

Permalink
fix: fix file compression deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
boxsnake committed Dec 17, 2023
1 parent 8fd4ea0 commit 5827fc3
Show file tree
Hide file tree
Showing 2 changed files with 8,636 additions and 5,649 deletions.
57 changes: 33 additions & 24 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
build:
runs-on: ubuntu-latest
runs-on: windows-latest

steps:
- name: Checkout
Expand All @@ -16,18 +16,22 @@ jobs:
# “最近更新时间” 等 git 日志相关信息,需要拉取全部提交记录
fetch-depth: 0

- name: Set node version to 18
uses: actions/setup-node@v3
- name: Set node version to 20
uses: actions/setup-node@v4
with:
node-version: 18

- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
node-version: 20

# - name: Setup pnpm
# uses: pnpm/action-setup@v2
# with:
# version: 8
# - name: Cache pnpm modules
# uses: actions/cache@v3
# with:
# path: ~/.pnpm-store
# key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-

- name: Install dependencies
uses: pnpm/action-setup@v2
Expand All @@ -38,16 +42,21 @@ jobs:
- name: Build
run: pnpm build

- name: Test
run: |
ls ./dist/imgs/manual/batch-selection
ls ./src/public/imgs/manual/batch-selection
# 部署
- name: Deploy
uses: easingthemes/[email protected]
env:
SSH_PRIVATE_KEY: ${{ secrets.ACCESS_TOKEN }}
# 删除服务器上目录里所有文件
# ARGS: '-avz --delete'
# 项目 build 后静态文件位置
SOURCE: './dist/'
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_PORT: ${{ secrets.REMOTE_PORT }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.TARGET }}
# - name: Deploy
# uses: appleboy/[email protected]
# with:
# host: ${{ secrets.REMOTE_HOST }}
# port: ${{ secrets.REMOTE_PORT }}
# username: ${{ secrets.REMOTE_USER }}
# key: ${{ secrets.ACCESS_TOKEN }}
# source: dist/
# target: ${{ secrets.TARGET }}
# overwrite: true
# tar_dereference: true
# use_insecure_cipher: true
# strip_components: 1
Loading

0 comments on commit 5827fc3

Please sign in to comment.