Update gh-pages.yml #763
Workflow file for this run
This file contains hidden or 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 GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-20.04 | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout repository (with submodules) | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- name: Set up Python | |
uses: actions/setup-python@v2.2.1 | |
with: | |
python-version: 3.9 | |
- name: Install sphinx | |
run: | | |
pip install sphinx | |
pip install furo | |
pip install sphinx-togglebutton | |
pip install pygments-lammps | |
pip install sphinx-favicon | |
pip install sphinxcontrib.bibtex | |
pip install sphinx-tabs | |
- name: Build | |
run: | | |
cd docs/sphinx/ | |
make clean | |
make html | |
cp source/index_replace.html build/html/index.html | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
if: ${{ github.ref == 'refs/heads/main' }} | |
with: | |
context: . | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/ |