From f3978f8207a1c8ecbb957b35c7c2b77603835995 Mon Sep 17 00:00:00 2001 From: freeziyou <80776877@qq.com> Date: Mon, 19 Feb 2024 16:50:30 +0800 Subject: [PATCH] update docker-image.yml --- .github/workflows/docker-image.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 69921d32..cc7b14e7 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -5,11 +5,13 @@ on: branches: [ "main" ] paths: - '**' + - 'website/**' workflow_dispatch: jobs: build-main-app: runs-on: ubuntu-latest + if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && !contains(github.event.head_commit.modified, 'website')) }} steps: - name: Check out the repo uses: actions/checkout@v2 @@ -27,3 +29,26 @@ jobs: file: deploy/Dockerfile push: true tags: connectai/gitmaya:latest + + build-website: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.modified, 'website') }} + steps: + - name: Check out the repo + uses: actions/checkout@v2 + with: + submodules: 'true' + + - name: Log in to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_HUB_ACCOUNT }} + password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} + + - name: Build and push website Docker image + uses: docker/build-push-action@v2 + with: + context: . + file: deploy/Dockerfile.proxy + push: true + tags: connectai/gitmaya-proxy:latest