GitHub Actions housekeeping, update dependencies #39
This file contains 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: Generate documentation and create nuget package (eventually) | |
on: | |
push: | |
branches: | |
- main | |
# Eventually we'll only build when a new version tag is created | |
# tags: | |
# - 'v*.*.*' | |
# Allows you to run this workflow manually from the Actions tab | |
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: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Restore tools | |
run: dotnet tool restore | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --no-restore -c Release | |
- name: Run fsdocs | |
run: dotnet fsdocs build --properties Configuration=Release --parameters root /diku-canvas/ | |
- name: Upload generated documentation | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./output | |
# - name: Pack | |
# run: dotnet pack -c Release | |
# - name: NuGet push | |
# run: dotnet nuget push **/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} | |
# Deployment job | |
deploy: | |
needs: build | |
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 |