Skip to content

Merge pull request #13 from NEASQC/develop #39

Merge pull request #13 from NEASQC/develop

Merge pull request #13 from NEASQC/develop #39

Workflow file for this run

name: Sphinx Build
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
paths: 'doc/**'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Sphinx Build
# You may pin to the exact commit or the version.
uses: ammaraskar/sphinx-action@master
with:
# The folder containing your sphinx docs.
docs-folder: 'doc/' # default is docs/
# The command used to build your documentation.
build-command: 'sphinx-build -b html . _build' # optional, default is make html
# Run before the build command, you can use this to install system level dependencies, for example with "apt-get update -y && apt-get install -y perl"
pre-build-command: 'python -m pip install sphinx_rtd_theme nbsphinx sphinxcontrib.bibtex sphinxcontrib.programoutput sphinxcontrib.contentui enum-tools[sphinx] autodoc MarkupSafe==2.0.1'
#- name: Upload a Build Artifact
# uses: actions/upload-artifact@v2
# with:
# name: 'html.zip'
# path: 'doc/_build/'
- name: Checkout neasqc.github.io
uses: actions/checkout@v2
with:
ref: main
persist-credentials: true
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
repository: NEASQC/neasqc.github.io
path: "neasqc"
token: ${{ secrets.ACTION_TOKEN }}
- name: Create local changes
run: |
mkdir -p neasqc/qrbs #Replace test with repo name
rm -rf neasqc/qrbs/* #Replace test with repo name
cp -r doc/_build/* neasqc/qrbs #Replace test with repo name
cd neasqc
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation from github actions" || true
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: main
directory: neasqc
repository: NEASQC/neasqc.github.io