-
Notifications
You must be signed in to change notification settings - Fork 3
82 lines (73 loc) · 3.66 KB
/
sphinx_doc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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"
build-command: 'python -m pip install sphinx_rtd_theme nbsphinx sphinxcontrib.bibtex sphinxcontrib.programoutput sphinxcontrib.contentui autodoc MarkupSafe==2.0.1'
# - name: Instala
# run: |
# pip install sphinx_rtd_theme nbsphinx sphinxcontrib.bibtex
# pip install sphinxcontrib.programoutput sphinxcontrib.contentui
# pip install autodoc MarkupSafe==2.0.1
# cd doc
# sphinx-build -b html . _build
# - 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 autodoc MarkupSafe==2.0.1'
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: 'html.zip'
path: 'doc/_build/'
- name: Checkout neasqc.github.io
uses: actions/checkout@v4
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/FinancialApplications #Replace test with repo name
rm -rf neasqc/FinancialApplications/* #Replace test with repo name
cp -r doc/_build/* neasqc/FinancialApplications #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