Skip to content

ci: auto deploy the GitHub pages/docs on releases #659

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

Merged
merged 3 commits into from
Feb 2, 2023
Merged
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
57 changes: 57 additions & 0 deletions .github/workflows/ghpages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy Docs to GitHub

on:
release:
types: [published]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: true

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-22.04
steps:
- name: 'Checkout'
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Get latest tag'
run: echo "GIT_LATEST_TAG=$(git tag | grep '^[0-9]\+\.[0-9]\+\?\.[0-9]\+\?$' | sort -V -r | head -n1)" >> $GITHUB_ENV

- name: 'Variables'
run: |
echo $GITHUB_REF_NAME
echo $GIT_LATEST_TAG

- name: 'Install prerequisites'
if: github.ref_name == env.GIT_LATEST_TAG
run: |
sudo apt-get update
sudo apt-get install -y \
libdrm-dev \
doxygen \
meson \
- name: 'Build the Docs'
if: github.ref_name == env.GIT_LATEST_TAG
run: meson setup _build -D enable_docs=true && meson compile -C _build

- name: 'Upload the artifacts'
if: github.ref_name == env.GIT_LATEST_TAG
uses: actions/upload-pages-artifact@v1
with:
path: "_build/doc/html-out"

- name: 'Deploy to GitHub Pages'
if: github.ref_name == env.GIT_LATEST_TAG
id: deployment
uses: actions/deploy-pages@v1
3 changes: 2 additions & 1 deletion doc/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,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 All @@ -33,7 +34,7 @@ foreach h : libva_headers_doc
endforeach

config = configuration_data()
config.set('PACKAGE_VERSION', meson.project_version())
config.set('PACKAGE_VERSION', libva_version)
config.set('VA_HEADER_DIR', headerdir)
config.set('VA_HEADER_FILES', headers)
config.set('VA_HTML_FOOTER', footer)
Expand Down