Add static homepage, Dockerfile (nginx), and CI build/push workflow
- index.html: clean static homepage (name + intro, links), light/dark mode - Dockerfile: nginx:1.27-alpine serves the page on :80 with a healthcheck - .gitea/workflows/build.yml: on push to main, build and push the image to git.ffaerber.duckdns.org/ffaerber/homepage (tags :latest and :sha)
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
name: build-and-push
|
||||
run-name: "build-and-push · ${gitea.ref_name}"
|
||||
# Builds the homepage image and pushes it to this Gitea instance's container
|
||||
# registry as git.ffaerber.duckdns.org/ffaerber/homepage:latest on every push to main.
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
env:
|
||||
IMAGE: git.ffaerber.duckdns.org/ffaerber/homepage
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: git.ffaerber.duckdns.org
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
${{ env.IMAGE }}:latest
|
||||
${{ env.IMAGE }}:${{ gitea.sha }}
|
||||
provenance: false
|
||||
Reference in New Issue
Block a user