-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (71 loc) · 3.22 KB
/
docs_upload.yml
File metadata and controls
87 lines (71 loc) · 3.22 KB
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
83
84
85
86
87
# This is a basic workflow to help you get started with Actions
name: Documentation Upload
# Controls when the action will run.
on:
repository_dispatch:
types: [docs-update-event]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# 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
container:
image: kselyunin/python3.9-sphinx-rtd:v0.1
# 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
with:
repository: RedshiftLabsPtyLtd/rsl_sphinx_docs
path: 'rsl_sphinx_docs'
ref: ${{ github.event.client_payload.sha }}
token: ${{ secrets.REPO_ACCESS_TOKEN }}
- uses: actions/checkout@v2
with:
repository: RedshiftLabsPtyLtd/rsl_docs
path: 'rsl_docs'
ref: gh-pages
token: ${{ secrets.REPO_ACCESS_TOKEN }}
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
ls -la .
pwd
ls -la rsl_sphinx_docs
cd rsl_sphinx_docs && sphinx-build -b html source build/html
mkdir -p ../rsl_docs/docs
cp -r build/html/* ../rsl_docs/docs
cd ../rsl_docs/docs && touch .nojekyll && cd ..
- name: Commit newly generated sources
uses: EndBug/add-and-commit@v7 # You can change this to use a specific version
with:
# The arguments for the `git add` command (see the paragraph below for more info)
# Default: '.'
add: '.'
# Name of the branch to use, if different from the one that triggered the workflow
# Default: the branch that triggered the run
branch: gh-pages
# The local path to the directory where your repository is located. You should use actions/checkout first to set it up
# Default: '.'
cwd: './rsl_docs'
# The message for the commit
# Default: 'Commit from GitHub Actions (name of the workflow)'
message: 'Docs ${{ github.event.client_payload.release }}'
# The flag used on the pull strategy. Use NO-PULL to avoid the action pulling at all.
# Default: '--no-rebase'
pull_strategy: 'NO-PULL'
# Whether to push the commit and, if any, its tags to the repo. It can also be used to set the git push arguments (see the paragraph below for more info)
# Default: true
push: true
# The arguments for the `git rm` command (see the paragraph below for more info)
# Default: ''
remove: ''
# Whether to use the --signoff option on `git commit` (only `true` and `false` are accepted)
# Default: false
signoff: true
# Arguments for the git tag command (the tag name always needs to be the first word not preceded by an hyphen)
# Default: ''
tag: '${{ github.event.client_payload.release }} --force'