Skip to content

ci: add deploy docs #642

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: deploy docs

on:
release:
types: [released]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: tag_name
name: Get latest tag_name
run: |
echo "GIT_LATEST_TAG=`echo $(git tag | grep '^[0-9]\+\.[0-9]\+\?\.[0-9]\+\?$' | sort -V -r | head -n1)`" >> $GITHUB_ENV
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By checking the tag, only the latest version of the document is updated.

- name: Install prerequisites
run: |
sudo apt-get update
sudo apt-get install -y \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better option IMHO is to use:

  • apt-get build-dep libva
  • apt-get install extra-deps-not-installed-with-above

libdrm-dev \
libegl1-mesa-dev \
libgl1-mesa-dev \
libx11-dev \
libxext-dev \
libxfixes-dev \
libwayland-dev \
libx11-xcb-dev \
libxcb-dri3-0 \
doxygen \
ninja-build
- uses: actions/setup-python@v1
with:
python-version: '3.10'
- name: Build docs
run: |
python -m pip install meson
meson _build -Denable_docs=true
meson compile -C _build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@jangsc0000 jangsc0000 Oct 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried this, but couldn't deploy with release tag.
and additional settings are required in the Settings tab.

if: ${{ github.ref_name }} == ${{ env.GIT_LATEST_TAG }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/doc/html-out
1 change: 1 addition & 0 deletions doc/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ libva_headers_doc = [
'va_enc_hevc.h',
'va_enc_vp8.h',
'va_enc_vp9.h',
'va_enc_av1.h',
'va_fei.h',
'va_fei_h264.h',
'va_fei_hevc.h',
Expand Down