Skip to content

Commit

Permalink
add: .github/workflows/deploy.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
netpyoung committed Nov 20, 2024
1 parent e619f4b commit 8320255
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build and deploy GH Pages

## ref: https://dotnet.github.io/docfx/index.html

on:
push:
branches:
- main
paths:
- 'docfx/**'
- 'NF.Tool.PatchNoteMaker/**'

jobs:
publish-docs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Dotnet Setup
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

- name: Install DocFX
run: |
dotnet tool update -g docfx
- name: Build DocFX
run: |
docfx docfx/docfx.json
touch ./docfx/_site/.nojekyll
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docfx/_site

0 comments on commit 8320255

Please sign in to comment.