diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml new file mode 100644 index 00000000..1855709c --- /dev/null +++ b/.github/workflows/build-docker.yml @@ -0,0 +1,33 @@ +name: Docker Compose Build and Push + +on: + push: + branches: + - main + +jobs: + build_and_push: + runs-on: ubuntu-latest + + steps: + - name: Check out the repository, including submodules + uses: actions/checkout@v3 + with: + submodules: recursive + path: web + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker images + working-directory: ./web + run: | + npm install + npm run build.docker + docker-compose push