From 8722352670f7a3d0bcd9c274dd28edd21bd68da6 Mon Sep 17 00:00:00 2001 From: Lazy Hippopotamus Date: Wed, 26 Feb 2025 16:08:36 -0500 Subject: [PATCH] set up gitea pipeline --- .gitea/workflows/build.yaml | 20 ++++++++++++++++++++ Dockerfile | 24 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 .gitea/workflows/build.yaml create mode 100644 Dockerfile diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..6981ba4 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,20 @@ +name: sitix website build +run-name: building swaous.asuscomm.com/sitix +on: [push] + +jobs: + Build-Docker-Image: + runs-on: ubuntu-latest + steps: + - name: Pull repo + uses: actions/checkout@v4 + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + registry: swaous.asuscomm.com + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Build + run: | + docker build -t swaous.asuscomm.com/sitix-website:latest . + docker push swaous.asuscomm.com/sitix-website:latest diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f8d9490 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM swaous.asuscomm.com/sitix:latest AS build +# build the site + + +RUN mkdir site + +COPY site site + +RUN ls site + +ARG SITIX_ENVIRONMENT="production" + +RUN /sitix site -y -c ${SITIX_ENVIRONMENT} + + +FROM busybox:1.35 + +# Copy the static website +COPY --from=build /output /output + +WORKDIR output + +# Run BusyBox httpd +CMD ["busybox", "httpd", "-f", "-v", "-p", "80"]