Skip to content

Pin GitHub Actions to full-length commit SHAs #397

Pin GitHub Actions to full-length commit SHAs

Pin GitHub Actions to full-length commit SHAs #397

Workflow file for this run

name: Deploy Documentation to GitHub Pages
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@a37ce9120846195fa4ece8f58b268e6043cb2f26 # v3.7.0
- name: Set up Python
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4.9.1
with:
python-version: '3.12'
- name: Set up Pandoc
run: |
sudo apt-get update
sudo apt-get install -y pandoc
- name: Install dependencies
run: |
pip install sphinx sphinx-autodoc-typehints sphinx_book_theme sphinx-copybutton
pip install nbsphinx recommonmark Pygments
pip install pandoc
- name: Build the docs
run: |
cd docs
make html
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.repository == 'microsoft/mattersim' && ( startsWith( github.ref, 'refs/tags/' ) || github.ref == 'refs/heads/main' )
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html