3
.gitea/Containerfile
Normal file
3
.gitea/Containerfile
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
FROM ghcr.io/catthehacker/ubuntu:act-latest
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y hugo
|
49
.gitea/workflows/main.yaml
Normal file
49
.gitea/workflows/main.yaml
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
name: Build and Release Site
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- "**"
|
||||||
|
|
||||||
|
env:
|
||||||
|
THEME: themes/caldwell
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
builder:
|
||||||
|
uses: karaolidis/workflows/.gitea/workflows/builder.yaml@main
|
||||||
|
with:
|
||||||
|
registry: git.karaolidis.com
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
secrets:
|
||||||
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
|
release:
|
||||||
|
runs-on: nix
|
||||||
|
needs: builder
|
||||||
|
container:
|
||||||
|
image: ${{ needs.builder.outputs.tag }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Build Theme
|
||||||
|
run: |
|
||||||
|
cd {{ env.THEME }}
|
||||||
|
make
|
||||||
|
|
||||||
|
- name: Build Site
|
||||||
|
run: |
|
||||||
|
make hugo
|
||||||
|
|
||||||
|
- name: Package
|
||||||
|
run: |
|
||||||
|
tar -czf site.tar.gz -C public .
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: https://github.com/akkuman/gitea-release-action@main
|
||||||
|
with:
|
||||||
|
name: "Release ${{ github.sha }}"
|
||||||
|
tag_name: "release-${{ github.sha }}"
|
||||||
|
files: site.tar.gz
|
4
Makefile
4
Makefile
@@ -1,4 +1,4 @@
|
|||||||
.PHONY: all theme hugo dev clean
|
.PHONY: all theme hugo dev t clean
|
||||||
|
|
||||||
THEME := themes/caldwell
|
THEME := themes/caldwell
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ theme:
|
|||||||
cd $(THEME) && \
|
cd $(THEME) && \
|
||||||
nix develop --command make
|
nix develop --command make
|
||||||
|
|
||||||
hugo: theme
|
hugo:
|
||||||
hugo
|
hugo
|
||||||
|
|
||||||
dev: theme
|
dev: theme
|
||||||
|
Reference in New Issue
Block a user