更新 .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,18 +15,15 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
# - name: Install Git
|
# Output Node.js and npm version
|
||||||
# run: |
|
|
||||||
# apt-get update
|
|
||||||
# apt-get install -y git
|
|
||||||
|
|
||||||
- name: Output Node.js and npm version
|
- name: Output Node.js and npm version
|
||||||
run: |
|
run: |
|
||||||
echo "Node.js version:"
|
echo "Node.js version:"
|
||||||
node -v
|
node -v
|
||||||
echo "npm version:"
|
echo "npm version:"
|
||||||
npm -v
|
npm -v
|
||||||
|
|
||||||
|
# Clone repository
|
||||||
- name: Clone repository
|
- name: Clone repository
|
||||||
run: |
|
run: |
|
||||||
echo "Cloning repository..."
|
echo "Cloning repository..."
|
||||||
|
@ -35,6 +32,7 @@ jobs:
|
||||||
git checkout test
|
git checkout test
|
||||||
echo "Repository cloned and checked out to test branch."
|
echo "Repository cloned and checked out to test branch."
|
||||||
|
|
||||||
|
# Set NPM registry
|
||||||
- name: Set NPM registry
|
- name: Set NPM registry
|
||||||
run: |
|
run: |
|
||||||
echo "Setting NPM registry..."
|
echo "Setting NPM registry..."
|
||||||
|
@ -48,25 +46,38 @@ jobs:
|
||||||
npm install -g pnpm
|
npm install -g pnpm
|
||||||
echo "pnpm installed."
|
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
|
- name: Install dependencies and build
|
||||||
run: |
|
run: |
|
||||||
cd pansoft-plrl
|
cd pansoft-plrl
|
||||||
echo "Installing dependencies..."
|
echo "Installing dependencies..."
|
||||||
pnpm install --no-frozen-lockfile
|
pnpm install
|
||||||
echo "Dependencies installed."
|
echo "Dependencies installed."
|
||||||
echo "Building project..."
|
echo "Building project..."
|
||||||
pnpm build --filter ${{ matrix.project }}
|
pnpm build --filter ${{ matrix.project }}
|
||||||
echo "Project built."
|
echo "Project built."
|
||||||
|
|
||||||
|
# Transfer files to target server
|
||||||
- name: Transfer files to target server
|
- name: Transfer files to target server
|
||||||
run: |
|
run: |
|
||||||
echo "Transferring files..."
|
echo "Transferring files..."
|
||||||
cd pansoft-plrl
|
cd pansoft-plrl
|
||||||
echo "Local files in the directory:"
|
echo "Local files in the directory:"
|
||||||
ls
|
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."
|
echo "Files transferred."
|
||||||
|
|
||||||
|
# Execute remote commands
|
||||||
- name: Execute remote commands
|
- name: Execute remote commands
|
||||||
run: |
|
run: |
|
||||||
echo "Executing remote commands..."
|
echo "Executing remote commands..."
|
||||||
|
@ -76,4 +87,4 @@ jobs:
|
||||||
echo "Old files removed."
|
echo "Old files removed."
|
||||||
mv /opt/pansoft/dist/* /opt/pansoft/
|
mv /opt/pansoft/dist/* /opt/pansoft/
|
||||||
echo "Deployment complete."
|
echo "Deployment complete."
|
||||||
EOF
|
EOF
|
Loading…
Reference in New Issue