Merge pull request #402 from vmware/dependencies/requests-2.32 #7
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
name: documentation-ci | |
on: [push, pull_request] | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Setup JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: zulu | |
java-version: '17' | |
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
with: | |
key: mkdocs-material-${{ env.cache_id }} | |
path: .cache | |
restore-keys: | | |
mkdocs-material- | |
- name: Install mkdocs and associated plugins | |
run: pip install \ mkdocs-material \ mkdocs-autorefs \ mkdocs-material-extensions \ mkdocstrings \ mkdocstrings-python \ mkdocs-awesome-pages-plugin \ mkdocs-open-in-new-tab \ mike | |
- name: Install Python Adapter Library | |
run: pip install -e lib/python/ | |
- name: Generate Java Adapter Library Documentation | |
run: | | |
./lib/java/AdapterLibrary/gradlew -p lib/java/AdapterLibrary dokkaJavadoc | |
mkdir -p docs/references/java_project/java_lib/ | |
cp -r lib/java/AdapterLibrary/build/dokka/javadoc/* docs/references/java_project/java_lib/ | |
- name: Setup documentation user | |
run: | | |
git config --global user.name ci-bot | |
git config --global user.email [email protected] | |
- name: Build MKDocs Site | |
# If not on the main branch, build the docs to check for errors, but do not deploy | |
if: github.ref != 'refs/heads/main' | |
run: mkdocs build | |
- name: Deploy MKDocs Site | |
# If on the main branch, deploy the site to the 'development' version | |
if: github.ref == 'refs/heads/main' | |
run: mike deploy -b github-pages-documentation --push develop | |