Skip to content
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] fix deploy doc. #1086

Merged
merged 1 commit into from
Oct 9, 2024
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
37 changes: 27 additions & 10 deletions .github/workflows/deploy-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,17 @@ on:
workflow_call:
secrets:
REPO_ACCESS_TOKEN:
required: true
required: false
inputs:
deploy-on-gh-pages:
required: false
type: string
default: "true"

jobs:
deploy-doc-index:
runs-on: ubuntu-20.04
if: ${{ inputs.deploy-on-gh-pages == 'true' }}
runs-on: ubuntu-24.04
steps:
- name: Checkout remote head
uses: actions/checkout@master
Expand All @@ -22,8 +28,8 @@ jobs:
publish_dir: 'doc/index'
keep_files: true

deploy-doc:
runs-on: ubuntu-20.04
build-and-deploy-doc:
runs-on: ubuntu-24.04
steps:
- name: Prepare directories
run: |
Expand All @@ -36,11 +42,12 @@ jobs:
path: src/Radium-Engine
submodules: recursive
- name: pull updated repo (e.g. with new VERSION)
if: ${{ inputs.deploy-on-gh-pages == 'true' }}
run: git -C src/Radium-Engine pull origin ${{ github.event.ref }}
- name: Install packages
run : |
sudo apt-get install graphviz plantuml clang-9 libclang-9-dev
- name: Fetch recent doxygen (1.9.8)
sudo apt-get install graphviz plantuml
- name: Fetch recent doxygen
run: |
wget https://sourceforge.net/projects/doxygen/files/rel-1.12.0/doxygen-1.12.0.linux.bin.tar.gz -O doxygen.tar.gz
tar -zxvf doxygen.tar.gz -C doxygen --wildcards "*/bin"
Expand All @@ -52,24 +59,34 @@ jobs:
GITHUB_REF=${{ github.ref }}
echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
id: extract-branch
- name: Configure Doc
- name: Configure and build doc
run: |
cd build/Radium-Engine
ls -lh ../../doxygen/bin/doxygen
../../doxygen/bin/doxygen -v
cmake ../../src/Radium-Engine/doc -DCMAKE_EXECUTE_PROCESS_COMMAND_ECHO=STDOUT -DDOXYGEN_EXECUTABLE=../../doxygen/bin/doxygen
- name: Build Doc
run: |
export GITHUB_REF="${{ steps.extract-branch.outputs.branch }}"
cd build/Radium-Engine
cmake --build . --target RadiumDoc
# upload doc as artifact if not deployed
- name: Archive doc
if: ${{ inputs.deploy-on-gh-pages == 'false' }}
uses: actions/upload-artifact@v4
with:
name: doc
path: |
build/Radium-Engine/html/
- name: Fix badges github ref
if: ${{ inputs.deploy-on-gh-pages == 'true' }}
run: |
export GITHUB_REF="${{ steps.extract-branch.outputs.branch }}"
cd build/Radium-Engine
sed -i "s/\$(GITHUB_REF)/${GITHUB_REF}/g" html/index.html
- name: Git branch name
if: ${{ inputs.deploy-on-gh-pages == 'true' }}
id: git-branch-name
uses: EthanSK/git-branch-name-action@v1
- name: Deploy Doc
if: ${{ inputs.deploy-on-gh-pages == 'true' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.REPO_ACCESS_TOKEN }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pull-request-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ jobs:
macos: "false"
build-release: "false"
coverage: "true"
call-deploy-doc:
uses: ./.github/workflows/deploy-doc.yml
with:
deploy-on-gh-pages: "false"
Loading