Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to GitHub Actions #165

Merged
merged 44 commits into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
9ee44c9
Migrate to GitHub Actions
core-man Apr 20, 2021
e89d363
Merge branch 'master' into workflow
core-man Apr 20, 2021
e2638a1
Fix
core-man Apr 20, 2021
5f21ba6
Fix
core-man Apr 20, 2021
276c5c1
Fix a bug
core-man Apr 20, 2021
cd18849
Fix a bug
core-man Apr 20, 2021
1d8da88
Fix a tab bug
core-man Apr 20, 2021
c58dc86
Add everysel package
core-man Apr 20, 2021
626ac1d
Add hypcap package
core-man Apr 20, 2021
363a58c
Add default shell
core-man Apr 20, 2021
fb91a71
Remove hypcap
core-man Apr 20, 2021
f188682
Install hypcap
core-man Apr 20, 2021
0ad9799
Use yihui.org/tinytex
core-man Apr 20, 2021
c2d50ea
Remove hypcap
core-man Apr 20, 2021
7fce9d9
Add hyperref
core-man Apr 20, 2021
195a0e2
Use oberdiek
core-man Apr 20, 2021
b013fa0
Use setup-tinytext
core-man Apr 20, 2021
0913635
Sort LaTex packages alp
core-man Apr 20, 2021
00f8844
Use tlmgr to install sourcecoepro
core-man Apr 20, 2021
d26be57
Fix
core-man Apr 20, 2021
a42b333
Use yihui.org/tinytex
core-man Apr 20, 2021
8780221
Test fonts
core-man Apr 20, 2021
9f4fe6e
Test fonts
core-man Apr 20, 2021
d95342e
Test fonts
core-man Apr 20, 2021
7174f14
Test fonts
core-man Apr 20, 2021
1c21907
Test fonts
core-man Apr 20, 2021
6fca738
Test fonts
core-man Apr 20, 2021
0208d05
Test fonts
core-man Apr 20, 2021
e17d5f5
Test fonts
core-man Apr 20, 2021
da43db0
Update .github/workflows/deploy.yml
core-man Apr 20, 2021
ac7e532
Update .github/workflows/deploy.yml
core-man Apr 20, 2021
3518fe4
Fix
core-man Apr 20, 2021
2cf36ef
Add delpy documentation
core-man Apr 21, 2021
0991a02
Add a comment for fonts
core-man Apr 21, 2021
af548d9
Fix indentation
core-man Apr 21, 2021
46de0ea
Remove the comment
core-man Apr 21, 2021
0874544
Add bash
core-man Apr 21, 2021
fb44d2b
Remove cache font
core-man Apr 21, 2021
95c9de7
Update tlmgr
core-man Apr 21, 2021
d73fc9b
Test fonts
core-man Apr 21, 2021
ecc2669
Test fonts
core-man Apr 21, 2021
22f24fa
Merge branch 'master' into workflow
core-man Apr 21, 2021
24be3f0
Disable PR
core-man Apr 21, 2021
cf84e6c
Merge branch 'master' into workflow
seisman Apr 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#
# Build and deploy the documentation
#
name: Deploy

on:
#pull_request: # enable pull_request for testing
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
# Cancel previous runs that are not completed
- name: Cancel Previous Runs
uses: styfle/[email protected]

- name: Checkout
uses: actions/[email protected]

- name: Set up Python
uses: actions/setup-python@v2

- name: Install dependencies
run: pip install -r requirements.txt

- name: Build HTML documentaiton
run: make build_html

- name: Install TinyTeX
uses: r-lib/actions/setup-tinytex@v1

- name: Install LaTeX packages
run: |
tlmgr update --self
tlmgr install capt-of ctex datetime2 enumitem everysel fancyhdr \
fandol float ms needspace oberdiek parskip sourcecodepro tabulary \
titlesec tracklang ulem upquote varwidth wrapfig \
xcolor xecjk zhnumber
# Update the fonts
sudo cp -r ~/.TinyTeX/texmf-dist/fonts/opentype/adobe/ /usr/share/fonts/opentype
fc-cache -f -v

- name: Build PDF documentaiton
run: make build_pdf

- name: Deploy documentation
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/dirhtml
# Only keep the latest commit to avoid bloating the repository
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

29 changes: 22 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,44 @@
#

# You can set these variables from the command line.
SPHINXOPTS = -j auto
SPHINXBUILD = sphinx-build
SPHINXOPTS = -j auto
SOURCEDIR = source
BUILDDIR = build
DOCNAME = SAC_Docs
HTML = dirhtml
LATEXPDF = latexpdf

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile
.PHONY: help Makefile build build_html build_pdf server watch

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

build: dirhtml latexpdf
cp $(BUILDDIR)/latex/SAC_Docs.pdf $(BUILDDIR)/dirhtml
build: build_html build_pdf

build_html: $(HTML)

serve: dirhtml
cd $(BUILDDIR)/dirhtml && python -m http.server
build_pdf: $(LATEXPDF)
@echo
@echo "Copy built PDF to HTML directory"
@echo
cp $(BUILDDIR)/latex/$(DOCNAME).pdf $(BUILDDIR)/$(HTML)/

server: $(HTML)
@echo
@echo "Running a server on port 8009"
@echo "Open http://localhost:8009 in a web browser to preview the documentation"
@echo
cd $(BUILDDIR)/$(HTML) && python -m http.server 8009

# Watch a Sphinx directory and rebuild the documentation when a change is detected.
# See https://github.com/GaretJax/sphinx-autobuild for details
watch:
sphinx-autobuild --open-browser --delay 1 -b dirhtml $(SOURCEDIR) $(BUILDDIR)/dirhtml
sphinx-autobuild --open-browser --delay 1 -b ${HTML} ${SPHINXOPTS} $(SOURCEDIR) $(BUILDDIR)/${HTML}