-
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix file compression deployment
- Loading branch information
Showing
2 changed files
with
8,636 additions
and
5,649 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
|
@@ -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 | ||
|
@@ -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 |
Oops, something went wrong.