Merge pull request #101 from jasvinderkhurana/main #39
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: Build documentation and deploy | |
on: push | |
permissions: write-all | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@main | |
# Set up Python 3 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@main | |
with: | |
python-version: 3.9 | |
# Install sphinx and dependencies | |
- name: install sphinx and dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
pip3 install rst2pdf==0.99 sphinx==5.1.1 recommonmark==0.7.1 sphinx-markdown-tables==0.0.17 docutils==0.19 | |
# Build | |
- name: Build documentation | |
run: | | |
cd sphinx; make html | |
# Fixup | |
- name: Fixup | |
run: | | |
mkdir deploy | |
cp .nojekyll index.html LICENSE.txt README.md krs_rolling.repos deploy/ | |
cp -r sphinx site deploy/ | |
# Deploy | |
- name: Push | |
uses: s0/git-publish-subdir-action@develop | |
env: | |
REPO: self | |
BRANCH: gh-pages # The branch name where you want to push the assets | |
FOLDER: deploy # The directory where your assets are generated | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub will automatically add this - you don't need to bother getting a token | |
MESSAGE: "Build: ({sha}) {msg}" # The commit message |