-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh: split the docs and Fastvdma build to separate workflows
Signed-off-by: Wiktoria Kuna <[email protected]>
- Loading branch information
Showing
2 changed files
with
45 additions
and
38 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
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,45 @@ | ||
name: Documentation | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup documentation environment | ||
run: | | ||
export DEBIAN_FRONTEND=noninteractive | ||
sudo apt update -qq | ||
sudo apt install -y make python3 python3-pip | ||
pip3 install -r docs/requirements.txt | ||
- name: Build the documentation | ||
run: | | ||
SPHINXOPTS="-A conf_py_path=$DOCS_DIR/$SOURCEDIR/ -A commit=$CI_BUILD_REF -A branch=$CI_BUILD_REF_NAME" make html | ||
make linkcheck | ||
cp docs/*.png build/html | ||
- name: "Upload artifact: Sphinx HTML" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Documentation-HTML | ||
path: build/html | ||
|
||
- name: Publish site to GitHub Pages | ||
if: github.event_name != 'pull_request' | ||
run: | | ||
cd build/html | ||
touch .nojekyll | ||
git init | ||
cp ../../.git/config ./.git/config | ||
git add . | ||
git config --local user.email "BuildTheDocs@GitHubActions" | ||
git config --local user.name "GitHub Actions" | ||
git commit -a -m "update ${{ github.sha }}" | ||
git push -u origin +HEAD:gh-pages |