add workflow actions for building the app
This commit is contained in:
		| @ -18,17 +18,22 @@ jobs: | |||||||
|       - name: Set up Node.js |       - name: Set up Node.js | ||||||
|         uses: actions/setup-node@v2 |         uses: actions/setup-node@v2 | ||||||
|         with: |         with: | ||||||
|           node-version: '20' |           node-version: "20" | ||||||
|  |  | ||||||
|       - name: Install dependencies |       - name: Install dependencies | ||||||
|         run: npm install |         run: cd frontend && npm install | ||||||
|  |  | ||||||
|       - name: Build the project |       - name: Build the project | ||||||
|         run: npm run build |         run: cd frontend && npm run build | ||||||
|  |  | ||||||
|   build-and-push-docker-image: |   build-and-push-docker-image: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|  |     needs: build-portfolio-website | ||||||
|  |     if: success() | ||||||
|     steps: |     steps: | ||||||
|  |       - name: Set up Docker Buildx | ||||||
|  |         uses: docker/setup-buildx-action@v2 | ||||||
|  |  | ||||||
|       - name: Login to Docker registry |       - name: Login to Docker registry | ||||||
|         uses: docker/login-action@v2 |         uses: docker/login-action@v2 | ||||||
|         with: |         with: | ||||||
| @ -43,4 +48,3 @@ jobs: | |||||||
|           file: Dockerfile |           file: Dockerfile | ||||||
|           push: true |           push: true | ||||||
|           tags: ${{ secrets.DOCKER_REGISTRY }}/my-portfolio:latest |           tags: ${{ secrets.DOCKER_REGISTRY }}/my-portfolio:latest | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user