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
|
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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user