diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index 1dff7fe4..8c597be1 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -3,7 +3,9 @@ name: Deploy Youdeyiwu Docs site to Pages on: push: branches: [ main ] - + pull_request: + branches: + - main workflow_dispatch: permissions: diff --git a/.github/workflows/youdeyiwu-publish.yml b/.github/workflows/youdeyiwu-publish.yml new file mode 100644 index 00000000..7ea88d4b --- /dev/null +++ b/.github/workflows/youdeyiwu-publish.yml @@ -0,0 +1,46 @@ +name: ci + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Build image + uses: docker/build-push-action@v4 + with: + context: . + push: false + tags: dafengzhen/youdeyiwu:dev + + publish: + needs: build + runs-on: ubuntu-latest + name: Publish + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Push image + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: dafengzhen/youdeyiwu:dev