name: Deploy to Docker Container on: push: branches: - main jobs: deploy: runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v2 - name: Install dependencies and build run: | npm ci npm run production # - name: Log in to Docker registry # uses: docker/login-action@v2 # with: # registry: gitea.local.thethomaas.net # username: ${{ secrets.DOCKER_USERNAME }} # password: ${{ secrets.DOCKER_PASSWORD }} - name: Build Docker image run: sudo docker build -t thethomaas/11ty-workflow-example:latest --build-arg SITE_DIRECTORY=dist . # run: docker build -t gitea.local.thethomaas.net/thethomaas/11ty-workflow-example:latest --build-arg SITE_DIRECTORY=dist . # - name: Push Docker image # run: docker push gitea.local.thethomaas.net/thethomaas/11ty-workflow-example:latest - name: Set up Docker Compose uses: https://github.com/isbang/compose-action@v1.4.1 with: compose-file: docker-compose.yml - name: Start Docker Compose services run: docker-compose up -d