Merge pull request #1333 from Billy99/billy99-docs-ocp #1
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: bpfman-docs | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: [main] | |
tags: | |
- v* | |
jobs: | |
build-docs: | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 3 | |
steps: | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # @v4 | |
with: | |
ref: gh-pages | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # @v4 | |
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # @v5 | |
with: | |
python-version: 3.8 | |
- uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # @v5 | |
with: | |
# prettier-ignore | |
go-version: '1.21' # yamllint disable-line rule:quoted-strings | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Build API docs | |
run: | | |
./scripts/api-docs/generate.sh apidocs.html | |
- name: Configure Git user | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
- name: Deploy Docs (Release Version) | |
if: startsWith(github.ref_name, 'v') | |
run: | | |
mike deploy --push --update-aliases ${{ github.ref_name }} latest | |
- name: Deploy Docs (Development Version) | |
if: github.ref_name == 'main' | |
run: | | |
mike deploy --push main |