forked from intel/cri-resource-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request intel#1032 from marquiz/devel/ci-verify-refactor
github: refactor docs building
- Loading branch information
Showing
3 changed files
with
43 additions
and
35 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Publish | ||
name: Publish documentation | ||
|
||
on: | ||
push: | ||
|
@@ -13,27 +13,6 @@ concurrency: | |
|
||
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/push to gh-pages | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git push https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git gh-pages | ||
uses: "./.github/workflows/common-build-docs.yaml" | ||
with: | ||
publish: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,13 +36,6 @@ jobs: | |
- name: Codecov report | ||
run: bash <(curl -s https://codecov.io/bash) | ||
|
||
- name: Install gh-pages build dependencies | ||
run: | | ||
pip3 install --user -r docs/requirements.txt | ||
echo "`python3 -m site --user-base`/bin" >> $GITHUB_PATH | ||
- name: Verify update of gh-pages | ||
run: | | ||
git config user.name "Github" | ||
git config user.email "[email protected]" | ||
./scripts/build/update-gh-pages.sh | ||
build-docs: | ||
name: Verify docs build and gh-pages update | ||
uses: "./.github/workflows/common-build-docs.yaml" |