diff --git a/.forgejo/workflows/build.yml b/.forgejo/workflows/build.yml index 1195f92..ac90643 100644 --- a/.forgejo/workflows/build.yml +++ b/.forgejo/workflows/build.yml @@ -30,6 +30,37 @@ jobs: - name: Upload site artifact uses: forgejo/upload-artifact@v4 with: - name: docs + name: docs.zip path: site/ retention-days: 30 + + docker: + runs-on: ubuntu-latest + needs: build + container: catthehacker/ubuntu:act-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Download site artifact + uses: forgejo/download-artifact@v4 + with: + name: docs.zip + path: site/ + + - name: Log in to Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ vars.CONTAINER_REGISTRY }} + username: ${{ secrets.CONTAINER_REGISTRY_USERNAME }} + password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ${{ vars.CONTAINER_REGISTRY }}/servala/documentation:latest + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..20ba343 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM docker.io/caddy:latest + +COPY site/ /usr/share/caddy/ + +EXPOSE 80