Initial commit: static landing page with CI/CD
build / build-and-push (push) Failing after 1s

This commit is contained in:
nick
2026-07-12 05:53:08 +08:00
commit bc816c0925
5 changed files with 112 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
name: build
on:
push:
branches: [main]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log in to Gitea container registry
run: echo "${{ secrets.CI_REGISTRY_TOKEN }}" | docker login gitea.niq-dev.com -u "${{ gitea.actor }}" --password-stdin
- name: Build image
run: docker build -t gitea.niq-dev.com/gitea_admin/landing:${{ gitea.sha }} -t gitea.niq-dev.com/gitea_admin/landing:latest .
- name: Push image
run: |
docker push gitea.niq-dev.com/gitea_admin/landing:${{ gitea.sha }}
docker push gitea.niq-dev.com/gitea_admin/landing:latest
+2
View File
@@ -0,0 +1,2 @@
FROM nginx:1.27-alpine
COPY index.html /usr/share/nginx/html/index.html
+28
View File
@@ -0,0 +1,28 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>niq-dev.com</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
margin: 0;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
background: #0b0f14;
color: #e6edf3;
}
h1 {
font-weight: 500;
font-size: 1.5rem;
letter-spacing: 0.02em;
}
</style>
</head>
<body>
<h1>niq-dev.com</h1>
</body>
</html>
+57
View File
@@ -0,0 +1,57 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: landing
namespace: landing
spec:
replicas: 1
selector:
matchLabels:
app: landing
template:
metadata:
labels:
app: landing
spec:
containers:
- name: landing
image: gitea.niq-dev.com/gitea_admin/landing:latest
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: landing
namespace: landing
spec:
selector:
app: landing
ports:
- port: 80
targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: landing
namespace: landing
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
spec:
ingressClassName: traefik
tls:
- hosts:
- www.niq-dev.com
secretName: landing-tls
rules:
- host: www.niq-dev.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: landing
port:
number: 80
+4
View File
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: landing