Skip to content

Deploy to Github Pages #10

Deploy to Github Pages

Deploy to Github Pages #10

name: Deploy to Github Pages
on:
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:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.x'
- name: Restore dependencies
run: dotnet restore DirectiveAthena.Website.slnx
- name: Publish docs site
run: dotnet publish src/DirectiveAthena.Website -c Release -o ./out -p:BaseHref=/DirectiveAthena.Website/ -p:StaticWebAssetBasePath=/DirectiveAthena.Website/
- name: Copy index.html to 404.html
run: cp ./out/wwwroot/index.html ./out/wwwroot/404.html
- name: List published files
# sanity check so you can see what will be uploaded (optional)
run: |
echo "Published output:"
ls -la ./out/wwwroot
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: './out/wwwroot'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4