Skip to content

Commit

Permalink
Use Actions to publish docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rdipardo committed Apr 12, 2024
1 parent 7eb1819 commit 944245f
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 11 deletions.
37 changes: 28 additions & 9 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,32 @@ 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
- name: Publish docs
uses: peaceiris/actions-gh-pages@v3.9.3

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:
github_token: ${{ secrets.GITHUB_TOKEN }}
enable_jekyll: false
publish_dir: './output'
publish_branch: api
user_name: 'Fornax.Seo [action]'
user_email: 'Fornax.Seo@users.noreply.github.com'
commit_message: '${{ github.event.head_commit.message }}'
path: './site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ Target.create
|> Shell.cleanDirs)

// --------------------------------------------------------------------------------------
"Test" =?> ("Docs", CI_BUILD) =?> ("Clean", CI_BUILD) ==> "Pack"
"Test" =?> ("Clean", CI_BUILD) ==> "Pack"

"Test" =?> ("Demo", CI_BUILD) ==> "All"
"Build" ==> "Docs"
Expand Down
2 changes: 1 addition & 1 deletion example/Fornax.Seo.Example/Fornax.Seo.Example.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<ProjectReference Include="../../src/Fornax.Seo/Fornax.Seo.fsproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Markdig" Version="0.35.0" />
<PackageReference Include="Markdig" Version="0.36.2" />
</ItemGroup>
</Project>

0 comments on commit 944245f

Please sign in to comment.