Skip to content

Documentation: Update README.md #74

Documentation: Update README.md

Documentation: Update README.md #74

# Simple workflow for deploying static content to GitHub Pages
name: Documentation and Code Coverage
on:
# Runs on pushes targeting main and development branch
push:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
CC: clang
CXX: clang++
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build job
build:
# TODO: To use Linux we should figure out how to install libclang-9 for Doxygen 1.9.6 to work
runs-on: macos-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v4
- name: clang-format
run: ./SC.sh format check
- name: build documentation
run: ./SC.sh build documentation
- name: configure
run: ./SC.sh build configure SCTest
- name: compile
run: ./SC.sh build compile SCTest DebugCoverage
- name: coverage
run: ./SC.sh build coverage SCTest DebugCoverage
- name: move coverage to documentation
run: mv _Build/_Coverage/coverage _Build/_Documentation/docs
- name: fix documentation permissions
run: chmod -v -R +rX "_Build/_Documentation/docs"
- name: Setup Pages
# Skip documentation deployment step on forks
# This may fail because forks may not have enabled pages.
# Probably a better way to handle this would be by using a CI variable.
if: github.ref == 'refs/heads/main' && github.repository == 'Pagghiu/SaneCppLibraries'
uses: actions/configure-pages@v4
- name: Upload Artifact
if: github.ref == 'refs/heads/main' && github.repository == 'Pagghiu/SaneCppLibraries'
uses: actions/upload-pages-artifact@v3
with:
# location of the coverage artifacts
path: "_Build/_Documentation/docs"
deploy:
if: github.ref == 'refs/heads/main' && github.repository == 'Pagghiu/SaneCppLibraries'
runs-on: ubuntu-latest
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4