Skip to content

Commit

Permalink
[gh-actions] Build docs in a separate workflow
Browse files Browse the repository at this point in the history
Also: run job on a case-*in*sensitive file system (^)

 ---
 (^)

 Build      00:00:11.7835715
 Docs       00:00:00.0047760   (Could not find file '/home/runner/work/Fornax.Seo/Fornax.Seo/README.MD'.)
 Total:     00:00:11.8290545
 Status:    Failure
  • Loading branch information
rdipardo committed Aug 26, 2024
1 parent 0a22c2a commit 28d1f54
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 29 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/fsdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: API Docs

on:
push:
paths:
- 'docs/**'
- 'src/Fornax.Seo/*.fs'
- '.github/workflows/fsdocs.yml'
- 'README.md'
tags:
- '**'

permissions:
contents: read
pages: write
id-token: write

publish_docs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: windows-latest
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Build docs
run: .\build.cmd -e CI=true Docs
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
29 changes: 0 additions & 29 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,32 +66,3 @@ jobs:
dotnet nuget push release\Fornax.Seo.*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
env:
CI: true

publish_docs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
contents: read
pages: write
id-token: write
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Build docs
run: ./build -e CI=true Docs
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Nuget version][]][Package host]
[![NuGet workflow status][]][NuGet Workflow]
[![Test workflow status][]][Test Workflow]
[![Docs workflow status][]][Docs Workflow]

A SEO meta tag generator for [Fornax](https://ionide.io/Tools/fornax.html)

Expand Down Expand Up @@ -243,6 +244,8 @@ Distributed under the terms of the [Mozilla Public License Version 2.0][].
[NuGet workflow status]: https://github.com/rdipardo/Fornax.Seo/actions/workflows/nuget.yml/badge.svg
[Test Workflow]: https://github.com/rdipardo/Fornax.Seo/actions/workflows/ci.yml
[Test workflow status]: https://github.com/rdipardo/Fornax.Seo/actions/workflows/ci.yml/badge.svg
[Docs Workflow]: https://github.com/rdipardo/Fornax.Seo/actions/workflows/fsdocs.yml
[Docs workflow status]: https://github.com/rdipardo/Fornax.Seo/actions/workflows/fsdocs.yml/badge.svg
[Fornax CLI tool]: https://github.com/ionide/Fornax
[Mozilla Public License Version 2.0]: https://github.com/rdipardo/Fornax.Seo/blob/main/LICENSE

0 comments on commit 28d1f54

Please sign in to comment.