Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit 41cb7bd

Browse files
committed
Deploy automatically to gh-pages using Github Actions
1 parent 9253bd0 commit 41cb7bd

File tree

4 files changed

+32
-3
lines changed

4 files changed

+32
-3
lines changed

.github/workflows/deploy.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
6+
jobs:
7+
deploy:
8+
runs-on: ubuntu-latest
9+
name: Deploy
10+
steps:
11+
- name: Checkout repo
12+
uses: actions/checkout@v2
13+
- run: docker-compose pull
14+
- uses: satackey/[email protected]
15+
continue-on-error: true
16+
- run: docker-compose build
17+
- name: Build site
18+
run: docker-compose run web ls -l build/html
19+
- name: Deploy to Github Pages
20+
uses: JamesIves/[email protected]
21+
with:
22+
branch: gh-pages
23+
folder: build/html

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ COPY . /code
2424
WORKDIR /code
2525

2626
# Build and serve website
27-
CMD make html latexpdf && cp build/latex/*.pdf build/html && python3 -m http.server 8000 --directory build/html
27+
ENTRYPOINT ["./entrypoint.sh"]

docker-compose.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
version: "3.9"
1+
version: '3.9'
22

33
services:
44
web:
55
build: .
66
volumes:
77
- .:/code:Z
88
ports:
9-
- "8000:8000"
9+
- '8000:8000'
10+
command: '/usr/bin/python3 -m http.server 8000 --directory build/html'

entrypoint.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
make html latexpdf
4+
cp build/latex/*.pdf build/html
5+
exec "$@"

0 commit comments

Comments
 (0)