Merge branch 'master' of https://github.com/RandyGaul/cute_framework #132
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Documentation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| env: | |
| PYTHON_VERSION: 3.x | |
| CMAKE_BUILD_PARALLEL_LEVEL: 2 | |
| jobs: | |
| build: | |
| name: Build documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y --no-install-recommends libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev | |
| sudo apt-get install -y --no-install-recommends pngquant gcc-multilib libasound2-dev libpulse-dev \ | |
| libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev | |
| - name: Set up Python runtime | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install Python dependencies | |
| run: | | |
| pip install mkdocs mkdocs-material "mkdocs-material[imaging]" markdown-callouts | |
| - name: Docs parser | |
| run: | | |
| cmake -B build/debug -DCF_RUNTIME_SHADER_COMPILATION=OFF -DCF_CUTE_SHADERC=OFF | |
| cmake --build build/debug --target docsparser | |
| cd build/debug | |
| ./docsparser | |
| - name: Build documentation | |
| id: build | |
| run: | | |
| mkdocs build --clean | |
| mkdocs --version | |
| - name: Adjust permissions | |
| run: | | |
| chmod -c -R +rX site/ | while read line; do | |
| echo "::warning title=Invalid file permissions automatically fixed::$line" | |
| done | |
| - name: Upload to GitHub Pages | |
| id: deployment | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: site | |
| deploy: | |
| # Add a dependency to the build job | |
| needs: build | |
| # Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
| permissions: | |
| pages: write # to deploy to Pages | |
| id-token: write # to verify the deployment originates from an appropriate source | |
| # Deploy to the github-pages environment | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |