mirror of
				https://github.com/Powerful-517/yys-editor.git
				synced 2025-10-30 17:39:50 +00:00 
			
		
		
		
	
							
								
								
									
										34
									
								
								.github/workflows/deploy.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								.github/workflows/deploy.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,34 @@ | ||||
| name: Deploy to Production | ||||
|  | ||||
| on: | ||||
|   push: | ||||
|     branches: [ master ]  | ||||
|  | ||||
| jobs: | ||||
|   build-and-deploy: | ||||
|     runs-on: ubuntu-latest | ||||
|      | ||||
|     steps: | ||||
|     - name: Checkout code | ||||
|       uses: actions/checkout@v4 | ||||
|        | ||||
|     - name: Set up Node.js | ||||
|       uses: actions/setup-node@v4 | ||||
|       with: | ||||
|         node-version: '22' | ||||
|          | ||||
|     - name: Install dependencies and build | ||||
|       run: | | ||||
|         npm install | ||||
|         npm run build | ||||
|          | ||||
|     - name: Deploy to server via SSH | ||||
|       uses: appleboy/scp-action@v0.1.6 | ||||
|       with: | ||||
|         host: ${{ secrets.SERVER_HOST }}  | ||||
|         username: ${{ secrets.SERVER_USERNAME }}  | ||||
|         key: ${{ secrets.SSH_PRIVATE_KEY }}  | ||||
|         port: ${{ secrets.SERVER_PORT || 22 }}  | ||||
|         source: "dist/*"                      | ||||
|         target: "/var/www/html/yys-editor" | ||||
|         rm: true | ||||
		Reference in New Issue
	
	Block a user