Skip to content

rebuild-wasm-modules #130

rebuild-wasm-modules

rebuild-wasm-modules #130

name: Download and Deploy Artifacts
on:
repository_dispatch:
types: [rebuild-wasm-modules]
push:
branches:
- master
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
name: Ubuntu -> Build
steps:
- name: Install Doxygen
uses: DiligentGraphics/github-action/install-doxygen@v6
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout Diligent Engine
uses: actions/checkout@v4
with:
repository: DiligentGraphics/DiligentEngine
path: ${{github.workspace}}/DiligentEngine
submodules: true
- name: Build Documentation
working-directory: ${{github.workspace}}/DiligentEngine
shell: bash
run: |
# Build page structure
python Doc/md_pages.py Doc/pages.dox
# Build documentation
mkdir -p build/docs
# NB: the build path build/docs is specified in the Doxygen config file
doxygen Doc/doxygen.cfg
# Move documentation to the root directory
mv ${{github.workspace}}/DiligentEngine/build/docs/html ${{github.workspace}}/docs
# Remove the source directory
rm -rf ${{github.workspace}}/DiligentEngine
- name: Download artifacts
if: success()
working-directory: ${{github.workspace}}
run: |
python ./download_artifacts.py -t ${{ secrets.GITHUB_TOKEN }} -d ./BuildArtifacts
- name: Deploy to GitHub Pages
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git checkout --orphan gh-pages
git rm -rf .
cp -r BuildArtifacts/* .
rm -rf BuildArtifacts
git add .
git commit -m "Deploy to GitHub Pages"
git push -f origin gh-pages