This commit is contained in:
		
							parent
							
								
									e26bf17c17
								
							
						
					
					
						commit
						8121b07b1c
					
				| @ -24,26 +24,20 @@ jobs: | ||||
|       - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." | ||||
|       - run: echo "🖥️ The workflow is now ready to test your code on the runner." | ||||
| 
 | ||||
|       # 设置超时的Node.js安装 | ||||
|       - name: Setup Node.js | ||||
|         uses: actions/setup-node@v3 | ||||
|         timeout-minutes: 5 | ||||
|         with: | ||||
|           node-version: '23.5.0' | ||||
|       # 使用系统已安装的 Node.js v16.15.0 | ||||
|       - name: Use system Node.js v16.15.0 | ||||
|         run: | | ||||
|           echo "Using system Node.js" | ||||
|           node --version | ||||
|           npm --version | ||||
|           # 确保 Node.js 在 PATH 中 | ||||
|           export PATH=$(dirname $(which node)):$PATH | ||||
| 
 | ||||
|       - name: Install dependencies | ||||
|         run: | | ||||
|           timeout 300 npm install || { | ||||
|             echo "npm install failed or timed out" | ||||
|             exit 1 | ||||
|           } | ||||
|         run: npm install | ||||
| 
 | ||||
|       - name: Build project | ||||
|         run: | | ||||
|           timeout 300 npm run build || { | ||||
|             echo "Build failed or timed out" | ||||
|             exit 1 | ||||
|           } | ||||
|         run: npm run build | ||||
| 
 | ||||
|       - name: Package dist folder | ||||
|         run: | | ||||
| @ -53,10 +47,10 @@ jobs: | ||||
|             exit 1 | ||||
|           fi | ||||
|           zip -r frontend-dist.zip dist | ||||
|           mv frontend-dist.zip /yantoo/frontend/ | ||||
|           sudo mv frontend-dist.zip /yantoo/frontend/ | ||||
| 
 | ||||
|       - name: Extract package in target directory | ||||
|         run: | | ||||
|           cd /yantoo/frontend/ | ||||
|           unzip -o frontend-dist.zip | ||||
|           rm frontend-dist.zip | ||||
|           sudo unzip -o frontend-dist.zip | ||||
|           sudo rm frontend-dist.zip | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 libingxiang
						libingxiang