forked from intel/cri-resource-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 989 Bytes
/
common-build-docs.yaml
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
name: Build documentation
on:
workflow_call:
inputs:
publish:
default: false
required: false
type: boolean
jobs:
update-gh-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Fetch gh-pages
run: git fetch --no-tags --prune --depth=1 origin refs/heads/gh-pages:refs/heads/gh-pages
- name: Install build dependencies
run: |
pip3 install --user -r docs/requirements.txt
echo "`python3 -m site --user-base`/bin" >> $GITHUB_PATH
- name: Add docs from this revision to gh-pages
run: |
git config user.name "Github"
git config user.email "[email protected]"
./scripts/build/update-gh-pages.sh
- name: Publish gh-pages
if: ${{ inputs.publish }}
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git gh-pages