Merge pull request #1497 from vneiger/doc_nmod_poly_is_stuff #149
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
push: | |
branches: | |
- trunk | |
paths: | |
- 'doc/**' | |
- '.github/workflows/docs.yml' | |
jobs: | |
############################################################################## | |
# build documentation | |
############################################################################## | |
build-doc: | |
name: Push documentation to website | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Install TeX Live | |
uses: zauguin/install-texlive@v2 | |
with: | |
packages: >- | |
latexmk | |
pdftex | |
- name: "Setup" | |
run: | | |
sudo apt install -y python3-sphinx | |
sphinx-build --version | |
- name: "Build documentation" | |
run: | | |
cd doc | |
make html SPHINXOPTS="-W -j auto" | |
- name: "Build pdf documentation" | |
run: | | |
cd doc | |
make latexpdf SPHINXOPTS="-W -j auto" | |
- name: "Create a tarball of the documentation" | |
run: | | |
cd doc/build | |
mv html doc | |
mv latex/Flint.pdf doc | |
tar -czvf doc.tar.gz doc | |
- name: "Setup SSH key" | |
uses: shimataro/[email protected] | |
with: | |
key: ${{ secrets.SSH_KEY }} | |
name: id_ed25519 | |
known_hosts: ${{ secrets.KNOWN_HOSTS }} | |
- name: "Push documentation to server" | |
run: | | |
cd doc/build | |
ssh -t [email protected] 'mkdir ~/tmp' | |
scp doc.tar.gz [email protected]:~/tmp | |
ssh -t [email protected] 'cd ~/tmp && tar -xf doc.tar.gz && rm -rf ~/apps/flintlib_org/doc && mv doc ~/apps/flintlib_org && cd ~ && rm -rf ~/tmp' |