feat: deploy pages to Cloudflare pages
Some checks failed
Deploy pages / deploy (push) Failing after 20s
Some checks failed
Deploy pages / deploy (push) Failing after 20s
This commit is contained in:
parent
dd0efaab00
commit
27e0ddf95b
14 changed files with 68 additions and 283 deletions
|
@ -1,8 +0,0 @@
|
||||||
public/
|
|
||||||
.github/
|
|
||||||
.git/
|
|
||||||
|
|
||||||
Dockerfile
|
|
||||||
.dockerignore
|
|
||||||
.gitignore
|
|
||||||
.gitmodules
|
|
96
.drone.yml
96
.drone.yml
|
@ -1,96 +0,0 @@
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: amd64
|
|
||||||
|
|
||||||
platform:
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: image build
|
|
||||||
image: gcr.io/kaniko-project/executor:debug
|
|
||||||
network_mode: host
|
|
||||||
commands:
|
|
||||||
- >
|
|
||||||
echo "{\"auths\": {\"https://code.icb4dc0.de\": {\"auth\" : \"$(printf '%s:%s' $$GITEA_USER $$GITEA_TOKEN | base64)\" }}}" > /kaniko/.docker/config.json
|
|
||||||
- /kaniko/executor --destination "$${IMAGE_REPO}:$${DRONE_COMMIT_SHA}_$${IMAGE_TAG}" --context "$${BUILD_CONTEXT}"
|
|
||||||
environment:
|
|
||||||
GITEA_USER: prskr
|
|
||||||
GITEA_TOKEN:
|
|
||||||
from_secret: gitea_token
|
|
||||||
IMAGE_REPO: code.icb4dc0.de/prskr/blog
|
|
||||||
IMAGE_TAG: x86_64
|
|
||||||
BUILD_CONTEXT: .
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: arm64
|
|
||||||
|
|
||||||
platform:
|
|
||||||
arch: arm64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: image build
|
|
||||||
image: gcr.io/kaniko-project/executor:debug
|
|
||||||
network_mode: host
|
|
||||||
commands:
|
|
||||||
- >
|
|
||||||
echo "{\"auths\": {\"https://code.icb4dc0.de\": {\"auth\" : \"$(printf '%s:%s' $$GITEA_USER $$GITEA_TOKEN | base64)\" }}}" > /kaniko/.docker/config.json
|
|
||||||
- /kaniko/executor --destination "$${IMAGE_REPO}:$${DRONE_COMMIT_SHA}_$${IMAGE_TAG}" --context "$${BUILD_CONTEXT}"
|
|
||||||
environment:
|
|
||||||
GITEA_USER: prskr
|
|
||||||
GITEA_TOKEN:
|
|
||||||
from_secret: gitea_token
|
|
||||||
IMAGE_REPO: code.icb4dc0.de/prskr/blog
|
|
||||||
IMAGE_TAG: arm64
|
|
||||||
BUILD_CONTEXT: .
|
|
||||||
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: deploy
|
|
||||||
|
|
||||||
depends_on:
|
|
||||||
- amd64
|
|
||||||
- arm64
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: manifest
|
|
||||||
image: quay.io/buildah/stable
|
|
||||||
network_mode: host
|
|
||||||
privileged: true
|
|
||||||
commands:
|
|
||||||
- buildah login "$${IMAGE_REGISTRY}" --username "$${GITEA_USER}" --password "$${GITEA_TOKEN}"
|
|
||||||
- buildah manifest create "$${IMAGE_REGISTRY}/$${IMAGE_REPO}:$${DRONE_COMMIT_SHA}"
|
|
||||||
- buildah manifest add "$${IMAGE_REGISTRY}/$${IMAGE_REPO}:$${DRONE_COMMIT_SHA}" "docker://$${IMAGE_REGISTRY}/$${IMAGE_REPO}:$${DRONE_COMMIT_SHA}_x86_64"
|
|
||||||
- buildah manifest add "$${IMAGE_REGISTRY}/$${IMAGE_REPO}:$${DRONE_COMMIT_SHA}" "docker://$${IMAGE_REGISTRY}/$${IMAGE_REPO}:$${DRONE_COMMIT_SHA}_arm64"
|
|
||||||
- buildah manifest push --all "$${IMAGE_REGISTRY}/$${IMAGE_REPO}:$${DRONE_COMMIT_SHA}" "docker://$${IMAGE_REGISTRY}/$${IMAGE_REPO}:$${DRONE_COMMIT_SHA}"
|
|
||||||
environment:
|
|
||||||
GITEA_USER: prskr
|
|
||||||
GITEA_TOKEN:
|
|
||||||
from_secret: gitea_token
|
|
||||||
IMAGE_REGISTRY: code.icb4dc0.de
|
|
||||||
IMAGE_REPO: prskr/blog
|
|
||||||
|
|
||||||
- name: deploy
|
|
||||||
image: code.icb4dc0.de/prskr/ci-images/kustomize:latest
|
|
||||||
network_mode: host
|
|
||||||
commands:
|
|
||||||
- cd deploy/k8s
|
|
||||||
- kustomize edit set image buildr-docs=code.icb4dc0.de/prskr/blog:$DRONE_COMMIT_SHA
|
|
||||||
- kubectl config set-cluster hetzner --server=$K8S_API_URL --insecure-skip-tls-verify=true
|
|
||||||
- kubectl config set-credentials drone-deploy --token=$K8S_TOKEN
|
|
||||||
- kubectl config set-context hetzner --user=drone-deploy --namespace=buildr --cluster hetzner
|
|
||||||
- kubectl config use-context hetzner
|
|
||||||
- kubectl apply -k .
|
|
||||||
environment:
|
|
||||||
K8S_TOKEN:
|
|
||||||
from_secret: k8s_token
|
|
||||||
K8S_API_URL:
|
|
||||||
from_secret: k8s_api_url
|
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
include:
|
|
||||||
- refs/tags/**
|
|
||||||
- refs/heads/main
|
|
21
.forgejo/workflows/deploy.yml
Normal file
21
.forgejo/workflows/deploy.yml
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
name: Deploy pages
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Setup Hugo
|
||||||
|
uses: peaceiris/actions-hugo@v3
|
||||||
|
- name: Build
|
||||||
|
run: hugo --minify --environment production
|
||||||
|
- name: Deploy
|
||||||
|
uses: cloudflare/wrangler-action@v3
|
||||||
|
with:
|
||||||
|
apiToken: ${{ secrets.CF_PAGES_TOKEN }}
|
||||||
|
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
|
command: pages deploy public --project-name=blog
|
81
config.toml
81
config.toml
|
@ -1,60 +1,57 @@
|
||||||
baseURL = 'https://www.icb4dc0.de/'
|
baseURL = 'https://www.icb4dc0.de/'
|
||||||
languageCode = 'en-us'
|
languageCode = 'en-us'
|
||||||
title = 'icb4dc0.de'
|
title = 'icb4dc0.de'
|
||||||
theme = ['github.com/Mitrichius/hugo-theme-anubis']
|
|
||||||
paginate = 10
|
|
||||||
enableEmoji = true
|
|
||||||
disqusShortname = ""
|
|
||||||
googleAnalytics = ""
|
|
||||||
|
|
||||||
[author]
|
[module]
|
||||||
name = "Peter Kurfer"
|
[[module.imports]]
|
||||||
|
path = 'github.com/LordMathis/hugo-theme-nightfall'
|
||||||
|
|
||||||
[params]
|
[params]
|
||||||
author = "Peter Kurfer"
|
|
||||||
style= "auto"
|
style= "auto"
|
||||||
copyCodeButton = true
|
copyCodeButton = true
|
||||||
rssAsSocialIcon = true
|
rssAsSocialIcon = true
|
||||||
|
readingTime = true
|
||||||
|
published = true
|
||||||
|
|
||||||
[[menu.main]]
|
[params.author]
|
||||||
identifier = "about"
|
name = "Peter Kurfer"
|
||||||
name = "About"
|
email = "peter.kurfer@gmail.com"
|
||||||
url = "/about/"
|
|
||||||
weight = 1
|
|
||||||
|
|
||||||
[[menu.main]]
|
[menu]
|
||||||
identifier = "projects"
|
[[menu.header]]
|
||||||
name = "Projects"
|
name = "blog"
|
||||||
url = "/projects/"
|
weight = 0
|
||||||
weight = 2
|
url = "blog"
|
||||||
|
[[menu.header]]
|
||||||
[[menu.main]]
|
name = "about"
|
||||||
identifier = "tags"
|
weight = 1
|
||||||
name = "Tags"
|
url = "about"
|
||||||
url = "/tags/"
|
[[menu.header]]
|
||||||
weight = 3
|
name = "projects"
|
||||||
|
weight = 2
|
||||||
[[menu.main]]
|
url = "projects"
|
||||||
identifier = "archive"
|
[[menu.header]]
|
||||||
name = "Archive"
|
name = "tags"
|
||||||
url = "/posts/"
|
weight = 3
|
||||||
weight = 4
|
url = "tags"
|
||||||
|
|
||||||
[[params.social]]
|
[[params.social]]
|
||||||
id = "github"
|
name = "github"
|
||||||
name = "baez90"
|
url = "https://github.com/prskr"
|
||||||
|
icon = "fa-brands fa-github"
|
||||||
|
target = "_blank"
|
||||||
|
aria = "GitHub Profile"
|
||||||
|
|
||||||
[[params.social]]
|
[[params.social]]
|
||||||
id = "linkedin"
|
name = "linkedin"
|
||||||
name = "peter-s-kurfer"
|
url = "https://www.linkedin.com/in/peter-s-kurfer/"
|
||||||
|
icon = "fa-brands fa-linkedin"
|
||||||
|
target = "_blank"
|
||||||
|
aria = "LinkedIn Profile"
|
||||||
|
|
||||||
[[params.social]]
|
[[params.social]]
|
||||||
id = "xing"
|
name = "xing"
|
||||||
url = "https://www.xing.com/profile/Sebastian_Kurfer"
|
url = "https://www.xing.com/profile/Sebastian_Kurfer"
|
||||||
|
icon = "fa-brands fa-xing"
|
||||||
[taxonomies]
|
target = "_blank"
|
||||||
category = "categories"
|
aria = "Xing Profile"
|
||||||
tag = "tags"
|
|
||||||
|
|
||||||
[markup.goldmark.renderer]
|
|
||||||
unsafe = true
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
title: 'About me'
|
title: 'About me'
|
||||||
button: 'About me'
|
button: 'About me'
|
||||||
weight: 1
|
weight: 1
|
||||||
|
showMetadata: false
|
||||||
---
|
---
|
||||||
|
|
||||||
My name's Peter. I'm a passionate software developer especially interested in all kind of networking stuff but also asynchronous data processing, software architecture, distributed computing, testing and automatic software quality analysis and many more.
|
My name's Peter. I'm a passionate software developer especially interested in all kind of networking stuff but also asynchronous data processing, software architecture, distributed computing, testing and automatic software quality analysis and many more.
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
title: 'Projects'
|
title: 'Projects'
|
||||||
button: 'Projects'
|
button: 'Projects'
|
||||||
weight: 2
|
weight: 2
|
||||||
|
showMetadata: false
|
||||||
---
|
---
|
||||||
|
|
||||||
## INetMock
|
## INetMock
|
||||||
|
|
|
@ -1,62 +0,0 @@
|
||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: Deployment
|
|
||||||
metadata:
|
|
||||||
name: blog
|
|
||||||
namespace: blog
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: blog
|
|
||||||
spec:
|
|
||||||
replicas: 2
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app.kubernetes.io/name: blog
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: blog
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: blog
|
|
||||||
image: blog
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
containerPort: 3000
|
|
||||||
protocol: TCP
|
|
||||||
- name: metrics
|
|
||||||
containerPort: 9100
|
|
||||||
protocol: TCP
|
|
||||||
resources:
|
|
||||||
limits:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 60Mi
|
|
||||||
requests:
|
|
||||||
cpu: 50m
|
|
||||||
memory: 20Mi
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /
|
|
||||||
port: http
|
|
||||||
scheme: HTTP
|
|
||||||
timeoutSeconds: 1
|
|
||||||
periodSeconds: 10
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 3
|
|
||||||
readinessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /
|
|
||||||
port: http
|
|
||||||
scheme: HTTP
|
|
||||||
timeoutSeconds: 1
|
|
||||||
periodSeconds: 10
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 3
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
securityContext:
|
|
||||||
capabilities:
|
|
||||||
drop:
|
|
||||||
- ALL
|
|
||||||
runAsUser: 65532
|
|
||||||
runAsNonRoot: true
|
|
||||||
readOnlyRootFilesystem: true
|
|
||||||
allowPrivilegeEscalation: false
|
|
|
@ -1,21 +0,0 @@
|
||||||
---
|
|
||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: blog
|
|
||||||
namespace: blog
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: blog
|
|
||||||
spec:
|
|
||||||
ingressClassName: traefik
|
|
||||||
rules:
|
|
||||||
- host: www.icb4dc0.de
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: ImplementationSpecific
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: blog
|
|
||||||
port:
|
|
||||||
number: 3000
|
|
|
@ -1,19 +0,0 @@
|
||||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
||||||
kind: Kustomization
|
|
||||||
|
|
||||||
namespace: blog
|
|
||||||
|
|
||||||
commonLabels:
|
|
||||||
app.kubernetes.io/instance: blog
|
|
||||||
app.kubernetes.io/managed-by: kustomize
|
|
||||||
|
|
||||||
images:
|
|
||||||
- name: blog
|
|
||||||
newName: code.icb4dc0.de/prskr/blog
|
|
||||||
newTag: latest
|
|
||||||
|
|
||||||
resources:
|
|
||||||
- "deployment.yaml"
|
|
||||||
- "service.yaml"
|
|
||||||
- "ingress.yaml"
|
|
||||||
- "pod_monitor.yaml"
|
|
|
@ -1,14 +0,0 @@
|
||||||
---
|
|
||||||
apiVersion: monitoring.coreos.com/v1
|
|
||||||
kind: PodMonitor
|
|
||||||
metadata:
|
|
||||||
name: blog-metrics
|
|
||||||
labels:
|
|
||||||
prometheus: default
|
|
||||||
app.kubernetes.io/name: blog
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app.kubernetes.io/name: blog
|
|
||||||
podMetricsEndpoints:
|
|
||||||
- port: metrics
|
|
|
@ -1,17 +0,0 @@
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: blog
|
|
||||||
namespace: blog
|
|
||||||
labels:
|
|
||||||
app.kubernetes.io/name: blog
|
|
||||||
spec:
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
protocol: TCP
|
|
||||||
port: 3000
|
|
||||||
targetPort: http
|
|
||||||
selector:
|
|
||||||
app.kubernetes.io/name: blog
|
|
||||||
type: ClusterIP
|
|
4
go.mod
4
go.mod
|
@ -1,5 +1,5 @@
|
||||||
module code.icb4dc0.de/prskr/blog
|
module code.icb4dc0.de/prskr/blog
|
||||||
|
|
||||||
go 1.19
|
go 1.22.2
|
||||||
|
|
||||||
require github.com/Mitrichius/hugo-theme-anubis v0.0.0-20220725170731-d4ba47cd2196 // indirect
|
require github.com/LordMathis/hugo-theme-nightfall v0.7.1 // indirect
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -1,2 +1,2 @@
|
||||||
github.com/Mitrichius/hugo-theme-anubis v0.0.0-20220725170731-d4ba47cd2196 h1:TzahMQaJXpezO9D2iQHnifGWPUn+41IWgYNBg/wNtQE=
|
github.com/LordMathis/hugo-theme-nightfall v0.7.1 h1:n8T4Eg/5ZJLXGWmRHHAZ9DrbIv0yXBATeNo/A3p8EoM=
|
||||||
github.com/Mitrichius/hugo-theme-anubis v0.0.0-20220725170731-d4ba47cd2196/go.mod h1:FKD3NbdsQzL+cXsC3x99XD/t/Rd5EyhDlNBAxQhULbo=
|
github.com/LordMathis/hugo-theme-nightfall v0.7.1/go.mod h1:0tCPxAeg5+tWhv17517Q8Lti/TPh0KNyON/uferEU30=
|
||||||
|
|
2
layouts/partials/custom-head.html
Normal file
2
layouts/partials/custom-head.html
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<script defer src="https://analytics.icb4dc0.de/script.js" data-website-id="fcc44d94-82fe-433a-bee1-46b586dc69f8"></script>
|
||||||
|
<script src="https://kit.fontawesome.com/e6634cbc14.js" crossorigin="anonymous"></script>
|
Loading…
Reference in a new issue