automate builds
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
parent
5a2cce637e
commit
d52f92f1fd
26
.gitea/workflows/deploy.yml
Normal file
26
.gitea/workflows/deploy.yml
Normal 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
|
19
Dockerfile
19
Dockerfile
@ -1,6 +1,13 @@
|
||||
FROM xena/alpine
|
||||
RUN apk --no-cache add quickserv
|
||||
ENV PORT 3000
|
||||
CMD quickserv -port $PORT -dir /book
|
||||
COPY ./book /book
|
||||
WORKDIR /book
|
||||
FROM git.xeserv.us/saved/xena/pandoc AS pandoc
|
||||
WORKDIR /tulpa/nomicon
|
||||
COPY . .
|
||||
RUN cd src && ./build.sh
|
||||
|
||||
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
|
||||
|
@ -111,5 +111,5 @@ ebook-convert tulpanomicon.epub tulpanomicon.mobi
|
||||
mkdir -p ../book
|
||||
cp -vrf tulpanomicon.mobi ../book/
|
||||
cp -vrf tulpanomicon.epub ../book/
|
||||
cp -vrf tulpanomicon.pdf ../book/
|
||||
cp -vrf tulpanomicon.pdf ../book
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user