mirror of
https://github.com/openmlsys/openmlsys-zh.git
synced 2026-04-05 11:47:55 +08:00
37
.github/workflows/update_docs.yml
vendored
Normal file
37
.github/workflows/update_docs.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
|
||||
name: CI
|
||||
|
||||
on:
|
||||
- pull_request:
|
||||
types:
|
||||
- closed
|
||||
- workflow_dispatch
|
||||
|
||||
jobs:
|
||||
if_merged:
|
||||
if: github.event.pull_request.merged == true
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: s-weigand/setup-conda@v1
|
||||
- run: conda config --append channels conda-forge
|
||||
- run: python3 -m pip install -r requirements.txt
|
||||
- run: conda install -y pandoc==2.17
|
||||
- run: pip install sphinx-mathjax-offline
|
||||
|
||||
- run: |
|
||||
git clone https://github.com/openmlsys/d2l-book.git
|
||||
cd d2l-book
|
||||
python3 -m pip install .
|
||||
- run: sh build_html.sh
|
||||
- run: cd ..
|
||||
- run: git clone https://github.com/openmlsys/openmlsys.github.io.git
|
||||
- run: cp -r openmlsys-zh/_build/html/* openmlsys.github.io/docs/
|
||||
- run: |
|
||||
cd openmlsys.github.io
|
||||
git add .
|
||||
git commit -m 'update docs'
|
||||
git push
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user