Skip to content

minor messing with spacing in docs site #24

minor messing with spacing in docs site

minor messing with spacing in docs site #24

name: Deploy Docs to GitHub pages
on:
push:
branches: [ main ]
paths:
- 'src/SCFirstOrderLogic.Documentation/**'
workflow_dispatch:
# 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-and-deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x'
- name: Publish Documentation project to 'release' folder
run: dotnet publish src/SCFirstOrderLogic.Documentation/SCFirstOrderLogic.Documentation.csproj -c Release -o release --nologo
- name: Change base href in index.html from / to SCFirstOrderLogic
run: sed -i 's/<base href="\/" \/>/<base href="\/SCFirstOrderLogic\/" \/>/g' release/wwwroot/index.html
# Copy index.html to 404.html to serve the same file when a file is not found
- name: copy index.html to 404.html
run: cp release/wwwroot/index.html release/wwwroot/404.html
# Add .nojekyll file to tell GitHub pages to not treat this as a Jekyll project (allows files and folders starting with an underscore).
- name: Add .nojekyll file
run: touch release/wwwroot/.nojekyll
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: release/wwwroot
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2