Skip to content

Modify workflow

Modify workflow #6

Workflow file for this run

name: Sphinx Build and Deploy
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install dependencies
run: |
pip install sphinx sphinx_rtd_theme myst_parser
- name: Build Sphinx for GitHub Pages
run: |
sphinx-build ./ ../_build
- name: Create .nojekyll
run: |
touch ../_build/.nojekyll
- name: Copy build files to gh-pages branch
run: |
git fetch origin
git checkout -b gh-pages origin/gh-pages
git rm -rf *
cp -r ../_build/* ./
- name: Commit and push changes
git config --global user.name "CAMS SDD"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add ./.
git commit -m "Autobuild latest version"
git push