Compare commits

..

4 Commits

Author SHA1 Message Date
262d1c9ae5 rm gitlab content
All checks were successful
Build & Deploy / build (push) Successful in 2m4s
Build & Deploy / deploy (push) Successful in 3s
2026-02-23 01:01:37 +01:00
e122282dd9 update ci
All checks were successful
Build & Deploy / build (push) Successful in 3m36s
Build & Deploy / deploy (push) Successful in 2s
2026-02-23 00:56:07 +01:00
f3bc011f8c add gitea ci
Some checks failed
Build & Deploy / build (push) Failing after 32s
Build & Deploy / deploy (push) Has been skipped
2026-02-23 00:18:06 +01:00
165735bbf1 Merge branch 'development' into 'main'
Add to prod

See merge request remo.liebmann/hallofbrawl-website!1
2026-02-16 18:04:33 +01:00
3 changed files with 56 additions and 61 deletions

View File

@@ -2,7 +2,7 @@
node_modules
.hugo_build.lock
.gitignore
.gitlab-ci.yml
.gitea
.gitmodules
docker-compose-dev.yaml
Dockerfile

55
.gitea/workflows/ci.yaml Normal file
View File

@@ -0,0 +1,55 @@
name: Build & Deploy
on:
push:
branches:
- main
- development
env:
REGISTRY: registry.remo-liebmann.de
IMAGE_NAME: hallofbrawl-homepage
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set environment
run: |
if [ "${GITHUB_REF##*/}" = "main" ]; then
echo "IMAGE_TAG=prod" >> $GITHUB_ENV
echo "HUGO_ENV=production" >> $GITHUB_ENV
else
echo "IMAGE_TAG=dev" >> $GITHUB_ENV
echo "HUGO_ENV=development" >> $GITHUB_ENV
fi
- name: Docker login
run: echo "${{ secrets.CI_REGISTRY_PASSWORD }}" | docker login $REGISTRY -u reguser --password-stdin
- name: Build image
run: |
docker build \
--build-arg HUGO_ENV=$HUGO_ENV \
-t $REGISTRY/$IMAGE_NAME:$IMAGE_TAG \
.
- name: Push image
run: docker push $REGISTRY/$IMAGE_NAME:$IMAGE_TAG
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Trigger Portainer
run: |
if [ "${GITHUB_REF##*/}" = "main" ]; then
curl --insecure -X POST "${{ secrets.PORTAINER_WEBHOOK_PROD }}"
else
curl --insecure -X POST "${{ secrets.PORTAINER_WEBHOOK_DEV }}"
fi

View File

@@ -1,60 +0,0 @@
stages:
- build
- deploy
variables:
DOCKER_TLS_CERTDIR: "/certs"
.build_template: &build_template
image: docker:24.0.5
stage: build
services:
- docker:24.0.5-dind
script:
- echo "$CI_REGISTRY_PASSWORD" | docker login registry.remo-liebmann.de -u reguser --password-stdin
- docker build --build-arg HUGO_ENV=$HUGO_ENV -t registry.remo-liebmann.de/hallofbrawl-homepage:$IMAGE_TAG .
- docker push registry.remo-liebmann.de/hallofbrawl-homepage:$IMAGE_TAG
.deploy_template: &deploy_template
image: alpine/curl
stage: deploy
script:
- curl --insecure -X POST $PORTAINER_WEBHOOK
# -------------------------
# PRODUCTION (main)
# -------------------------
build_prod:
<<: *build_template
only:
- main
variables:
IMAGE_TAG: prod
HUGO_ENV: production
deploy_prod:
<<: *deploy_template
only:
- main
variables:
PORTAINER_WEBHOOK: "https://192.168.12.21:9443/api/webhooks/1002a576-f003-4c5f-9079-41ed019f7bdc"
# -------------------------
# DEVELOPMENT (development)
# -------------------------
build_dev:
<<: *build_template
only:
- development
variables:
IMAGE_TAG: dev
HUGO_ENV: development
deploy_dev:
<<: *deploy_template
only:
- development
variables:
PORTAINER_WEBHOOK: "https://192.168.12.21:9443/api/webhooks/7a477f78-ced3-44d3-8a3d-5c05e8c565de"