mirror of
https://github.com/AntonioND/nitro-engine.git
synced 2025-06-18 08:35:44 -04:00
github: Add workflow to publish the documentation
This commit is contained in:
parent
926bb4f361
commit
02f3cd7012
79
.github/workflows/build.yml
vendored
Normal file
79
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
#
|
||||||
|
# SPDX-FileContributor: Antonio Niño Díaz, 2025
|
||||||
|
|
||||||
|
name: Documentation
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
paths-ignore:
|
||||||
|
- '**.rst'
|
||||||
|
- 'examples'
|
||||||
|
- 'licenses'
|
||||||
|
- 'Makefile*'
|
||||||
|
- 'source*'
|
||||||
|
- 'tests'
|
||||||
|
- 'tools'
|
||||||
|
workflow_dispatch:
|
||||||
|
repository_dispatch:
|
||||||
|
types: [run_build]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
generate_website:
|
||||||
|
name: Generate website
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Clone project
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: 'master'
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
sudo apt-get install doxygen
|
||||||
|
|
||||||
|
- name: Build documentation
|
||||||
|
run: |
|
||||||
|
cd documentation
|
||||||
|
bash generate.sh
|
||||||
|
|
||||||
|
# Create tarball with everything to upload to GitHub pages
|
||||||
|
cd html
|
||||||
|
tar -cvf ../../repo.tar ./*
|
||||||
|
|
||||||
|
- name: Upload repo artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: github-pages
|
||||||
|
path: repo.tar
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
publish_repo:
|
||||||
|
name: Publish website with GitHub pages
|
||||||
|
if: contains(github.ref,'refs/heads/master')
|
||||||
|
needs: [generate_website]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Setup Pages
|
||||||
|
uses: actions/configure-pages@v5
|
||||||
|
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
Loading…
Reference in New Issue
Block a user