Merge pull request #178 from nojaf/docs #12
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: Build and Test and Publish (master) | |
on: | |
push: | |
branches: | |
- master | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET for main project build | |
uses: actions/setup-dotnet@v3 | |
- name: Install local tools | |
run: dotnet tool restore | |
- name: Paket restore | |
run: dotnet paket restore | |
- name: Build | |
run: dotnet fake run build.fsx -t Release | |
- name: Publish NuGets (if main version changed) | |
run: dotnet nuget push "bin/*.nupkg" -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_KEY }} --skip-duplicate | |
- name: Build documentation | |
run: dotnet fake run build.fsx -t GenerateDocs | |
- name: Upload documentation | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: ./output | |
docs: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |