Merge pull request #454 from TimeWarpEngineering/Cramer/2024-07-25/Next #127
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: Publish Documentation | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: | |
- master | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
env: | |
DOTNET_NOLOGO: true # Disable the .NET logo in the console output | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Disable the .NET first time experience to skip caching NuGet packages and speed up the build | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
defaults: | |
run: | |
shell: pwsh | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: windows-latest | |
steps: | |
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | |
- name: List files in the repository | |
run: | | |
ls ${{ github.workspace }} | |
- name: Setup DocFX | |
uses: crazy-max/ghaction-chocolatey@v2 | |
with: | |
args: install docfx | |
- name: Build | |
run: | | |
cd ${{ github.workspace }}/Source/TimeWarp.State.Analyzer/ | |
dotnet clean --configuration Release | |
dotnet build --configuration Release | |
cd ${{ github.workspace }}/Source/TimeWarp.State.SourceGenerator/ | |
dotnet clean --configuration Release | |
dotnet build --configuration Release | |
cd ${{ github.workspace }}/Source/TimeWarp.State/ | |
dotnet clean --configuration Release | |
dotnet build --configuration Release | |
cd ${{ github.workspace }}/Source/TimeWarp.State.Plus/ | |
dotnet clean --configuration Release | |
dotnet build --configuration Release | |
- name: DocFX Build | |
working-directory: Documentation | |
run: docfx docfx.json | |
continue-on-error: false | |
- name: Setup Pages | |
uses: actions/configure-pages@v2 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
# Upload entire repository | |
path: './Documentation/_site' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 | |
- run: echo "🍏 This job's status is ${{ job.status }}." |