Dev #32
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: Update Docs | |
on: | |
- push | |
- pull_request | |
- workflow_dispatch | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- run: | | |
sudo apt-get update | |
sudo apt-get install -y pandoc | |
- run: | | |
python -m venv venv | |
source venv/bin/activate | |
pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install sphinx-mathjax-offline | |
git clone https://github.com/openmlsys/d2l-book.git | |
cd d2l-book | |
pip install . | |
cd .. | |
sh build_html.sh | |
- run: cd .. | |
- run: | | |
git clone https://${{ secrets.PAT_TOKEN }}@github.com/openmlsys/html-en.git | |
- run: cp -r _build/html/* html-en/ | |
- run: | | |
cd html-en | |
git config user.name "Chivier" | |
git config user.email "[email protected]" | |
git add . | |
git commit -m 'update docs' | |
git push https://${{ secrets.PAT_TOKEN }}@github.com/openmlsys/html-en.git main |