更新 .gitea/workflows/build-action.yaml
Frontend CI/CD / build (web-office) (push) Failing after 32s
Details
Frontend CI/CD / build (web-office) (push) Failing after 32s
Details
This commit is contained in:
parent
634c8c7b32
commit
6b65ce3c8b
|
@ -15,11 +15,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
|
||||
# - name: Install Git
|
||||
# run: |
|
||||
# apt-get update
|
||||
# apt-get install -y git
|
||||
|
||||
# Output Node.js and npm version
|
||||
- name: Output Node.js and npm version
|
||||
run: |
|
||||
echo "Node.js version:"
|
||||
|
@ -27,6 +23,7 @@ jobs:
|
|||
echo "npm version:"
|
||||
npm -v
|
||||
|
||||
# Clone repository
|
||||
- name: Clone repository
|
||||
run: |
|
||||
echo "Cloning repository..."
|
||||
|
@ -35,6 +32,7 @@ jobs:
|
|||
git checkout test
|
||||
echo "Repository cloned and checked out to test branch."
|
||||
|
||||
# Set NPM registry
|
||||
- name: Set NPM registry
|
||||
run: |
|
||||
echo "Setting NPM registry..."
|
||||
|
@ -48,25 +46,38 @@ jobs:
|
|||
npm install -g pnpm
|
||||
echo "pnpm installed."
|
||||
|
||||
# Cache pnpm dependencies
|
||||
- name: Cache pnpm store
|
||||
uses: actions/cache@v3
|
||||
id: pnpm-cache
|
||||
with:
|
||||
path: ~/.pnpm-store
|
||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('pansoft-plrl/pnpm-lock.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pnpm-store-
|
||||
|
||||
# Install dependencies and build
|
||||
- name: Install dependencies and build
|
||||
run: |
|
||||
cd pansoft-plrl
|
||||
echo "Installing dependencies..."
|
||||
pnpm install --no-frozen-lockfile
|
||||
pnpm install
|
||||
echo "Dependencies installed."
|
||||
echo "Building project..."
|
||||
pnpm build --filter ${{ matrix.project }}
|
||||
echo "Project built."
|
||||
|
||||
# Transfer files to target server
|
||||
- name: Transfer files to target server
|
||||
run: |
|
||||
echo "Transferring files..."
|
||||
cd pansoft-plrl
|
||||
echo "Local files in the directory:"
|
||||
ls
|
||||
sshpass -p "zxs123123" scp -o StrictHostKeyChecking=no -r ./apps/${{ matrix.project }}/dist.zip root@172.19.183.27:/opt/pansoft
|
||||
sshpass -p "zxs123123" scp -o StrictHostKeyChecking=no -r ./apps/web-office/dist.zip root@172.19.183.27:/opt/pansoft
|
||||
echo "Files transferred."
|
||||
|
||||
# Execute remote commands
|
||||
- name: Execute remote commands
|
||||
run: |
|
||||
echo "Executing remote commands..."
|
||||
|
|
Loading…
Reference in New Issue