diff --git a/.gitea/build.deploy b/.gitea/build.deploy new file mode 100644 index 0000000..29f5314 --- /dev/null +++ b/.gitea/build.deploy @@ -0,0 +1,39 @@ +name: Build and Push Docker Image to Gitea Registry + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + # Step 1: Checkout repository + - name: Checkout code + uses: actions/checkout@v4 + + # Step 2: Set up Docker Buildx + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + # Step 3: Log in to Gitea Container Registry + - name: Log in to Gitea Registry + uses: docker/login-action@v3 + with: + registry: git.3t.network + username: $alex + password: ${{ secrets.PACKAGEKEY }} + + # Step 4: Build and push Docker image + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: | + git.3t.network/${{ github.repository }}/static-site:${{ github.sha }} + git.3t.network/${{ github.repository }}/static-site:latest + cache-from: type=gha + cache-to: type=gha,mode=max \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ec6bf91 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM nginx:alpine +COPY index.html /usr/share/nginx/html/index.html +COPY style/style.css /usr/share/nginx/html/style/style.css +COPY assets/*.svg /usr/share/nginx/html/assets/ +EXPOSE 80 +CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file