Skip to content

Commit 4df5acd

Browse files
committed
add LaTeX document build environment
1 parent 608441e commit 4df5acd

File tree

7 files changed

+318
-0
lines changed

7 files changed

+318
-0
lines changed

.github/workflows/main.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: main
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
container:
10+
image: texlive/texlive
11+
defaults:
12+
run:
13+
working-directory: ./
14+
steps:
15+
- uses: actions/checkout@v1
16+
- name: make
17+
run: |
18+
make -j
19+
mkdir -p ./public/
20+
find . -name '*.pdf' | xargs -I% mv % ./public/
21+
for name in `ls public/`; do echo "<a href=./$name>$name</a><br>" >> public/index.html; echo "$name" >> public/list.txt; done
22+
- name: pages
23+
uses: peaceiris/actions-gh-pages@v3
24+
with:
25+
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
publish_dir: public
27+
force_orphan: true
28+
dispatch:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: repository
32+
run: |
33+
curl -X POST https://api.github.com/repos/ricosjp/rules/dispatches \
34+
-H "Accept: application/vnd.github.v3+json" \
35+
-H "authorization: token ${{ secrets.DISPATCH_TOKEN }}" \
36+
--data '{"event_type":"from '$GITHUB_REPOSITORY'"}'

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
desktop.ini
2+
.DS_Store
3+
*.aux
4+
*.fls
5+
*.dvi
6+
*.log
7+
*.pdf
8+
*.fdb_latexmk
9+
*.synctex.gz

.gitlab-ci.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
stages:
2+
- build
3+
- deploy
4+
5+
build:
6+
stage: build
7+
image: texlive/texlive
8+
script:
9+
- make -j
10+
- mkdir -p ./public/
11+
- find . -name '*.pdf' | xargs -I% mv % ./public/
12+
artifacts:
13+
paths:
14+
- public
15+
16+
pages:
17+
stage: deploy
18+
image: alpine
19+
dependencies:
20+
- build
21+
script:
22+
- for name in `ls public/`; do echo "<a href=./$name>$name</a><br>" >> public/index.html; echo "$name" >> public/list.txt; done
23+
artifacts:
24+
paths:
25+
- public
26+
only:
27+
refs:
28+
- main
29+
- pages

License.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2015, Research Institute for Computational Science Co. Ltd. (RICOS Co. Ltd.)
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Makefile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
SUBDIRS := src
2+
.PHONY: $(SUBDIRS)
3+
4+
%::
5+
$(MAKE) $(SUBDIRS) MAKECMDGOALS=$@
6+
7+
$(SUBDIRS):
8+
make -C $@ $(MAKECMDGOALS)
9+

src/Makefile

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
TEX = uplatex
2+
DVI = dvipdfmx
3+
sources = $(wildcard *.tex)
4+
artifacts = $(basename $(sources))
5+
6+
.PHONY: clean pdf view
7+
.PRECIOUS : %.pdf
8+
9+
build: $(artifacts)
10+
11+
pdf: $(artifacts)
12+
13+
view: build
14+
open $(addsuffix .pdf,$(artifacts))
15+
16+
%.dvi: %.tex
17+
$(TEX) $<
18+
$(TEX) $<
19+
$(TEX) $<
20+
21+
%.pdf: %.dvi
22+
$(DVI) $<
23+
24+
%: %.pdf
25+
-$(RM) $@.aux
26+
-$(RM) $@.log
27+
-$(RM) $@.ttt
28+
29+
clean:
30+
$(RM) *.pdf *.dvi *.aux *.log *.ttt

src/jpdoc.sty

+198
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)