CI create build step
This commit is contained in:
		
							
								
								
									
										17
									
								
								.github/workflows/deploy.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										17
									
								
								.github/workflows/deploy.yml
									
									
									
									
										vendored
									
									
								
							| @@ -2,14 +2,14 @@ name: Deploy App | ||||
| on: [push] | ||||
|  | ||||
| jobs: | ||||
|   deploy: | ||||
|   build: | ||||
|     runs-on: ubuntu-22.04 | ||||
|     container: | ||||
|       volumes: | ||||
|         - /var/docker-web:/var/docker-web | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       - name: Deploy with docker-web | ||||
|       - name: Prepare and build app | ||||
|         run: | | ||||
|           REPO_NAME="${GITHUB_REPOSITORY##*/}" | ||||
|           APP_DIR="/var/docker-web/apps/${REPO_NAME}" | ||||
| @@ -19,4 +19,17 @@ jobs: | ||||
|           cp -a $(find . -mindepth 1 -maxdepth 1 ! -name '.git' ! -name 'node_modules') "$APP_DIR/" | ||||
|           export COMPOSE_BAKE=false | ||||
|           docker rmi "local/${REPO_NAME}" 2>/dev/null || true | ||||
|           bash /var/docker-web/src/cli.sh build "${REPO_NAME}" | ||||
|  | ||||
|   deploy: | ||||
|     runs-on: ubuntu-22.04 | ||||
|     needs: build | ||||
|     container: | ||||
|       volumes: | ||||
|         - /var/docker-web:/var/docker-web | ||||
|     steps: | ||||
|       - uses: actions/checkout@v4 | ||||
|       - name: Deploy with docker-web | ||||
|         run: | | ||||
|           REPO_NAME="${GITHUB_REPOSITORY##*/}" | ||||
|           bash /var/docker-web/src/cli.sh up "${REPO_NAME}" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user