automate builds

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso 2025-01-12 23:38:31 -05:00
parent 5a2cce637e
commit d52f92f1fd
Signed by: xe
SSH Key Fingerprint: SHA256:7EWsWanxCI427bJ0t3CA6LyqXnkPajReCxkUhbpJULU
4 changed files with 40 additions and 8 deletions

1
.envrc
View File

@ -1 +0,0 @@
eval "$(lorri direnv)"

View File

@ -0,0 +1,26 @@
name: Gitea Actions CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
tests:
name: Build and deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: log into ghcr.io
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
registry: git.xeserv.us
username: mimi
password: ${{ secrets.PUSH_TOKEN }}
- name: build image
run: |
docker build -t git.xeserv.us/tulpamancy/tulpanomicon .
- name: push image
run: |
docker push git.xeserv.us/tulpamancy/tulpanomicon

View File

@ -1,6 +1,13 @@
FROM xena/alpine FROM git.xeserv.us/saved/xena/pandoc AS pandoc
RUN apk --no-cache add quickserv WORKDIR /tulpa/nomicon
ENV PORT 3000 COPY . .
CMD quickserv -port $PORT -dir /book RUN cd src && ./build.sh
COPY ./book /book
WORKDIR /book FROM peaceiris/mdbook AS mdbook
WORKDIR /tulpa/nomicon
COPY . .
RUN mdbook build
FROM nginx:alpine
COPY --from=pandoc /tulpa/nomicon/book /usr/share/nginx/html
COPY --from=mdbook /tulpa/nomicon/book /usr/share/nginx/html

View File

@ -111,5 +111,5 @@ ebook-convert tulpanomicon.epub tulpanomicon.mobi
mkdir -p ../book mkdir -p ../book
cp -vrf tulpanomicon.mobi ../book/ cp -vrf tulpanomicon.mobi ../book/
cp -vrf tulpanomicon.epub ../book/ cp -vrf tulpanomicon.epub ../book/
cp -vrf tulpanomicon.pdf ../book/ cp -vrf tulpanomicon.pdf ../book