Add deploy files

This commit is contained in:
51m0n
2026-03-13 20:04:00 +00:00
parent 5ca40e105b
commit bac2259a1a
2 changed files with 45 additions and 0 deletions

39
.gitea/build.deploy Normal file
View File

@@ -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

6
Dockerfile Normal file
View File

@@ -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;"]