-
Notifications
You must be signed in to change notification settings - Fork 306
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
ci: add deploy docs #642
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 | ||
- name: Install prerequisites | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A better option IMHO is to use:
|
||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did not look closely into github pages, but there seems to be standard ways of doing that. Why use custom github action?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried this, but couldn't deploy with release tag. |
||
if: ${{ github.ref_name }} == ${{ env.GIT_LATEST_TAG }} | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./_build/doc/html-out | ||
XinfengZhang marked this conversation as resolved.
Show resolved
Hide resolved
|
There was a problem hiding this comment.
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.