Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update index.md
I have updated the actions script because old version was not working properly in the newest versions of docfx. It now uses official upload pages actions instead of relying on the third party one. And now the default path is correct for website deployment: 'docfx_project/_site' instead of 'docs/_site'.
  • Loading branch information
ysftulek authored Nov 15, 2023
commit 418a1e014c40d47ff0dcabd2a2fb1e4f63da5125
35 changes: 30 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,29 @@ This example uses [`peaceiris/actions-gh-pages`](https://github.com/marketplace/

```yaml
# Your GitHub workflow file under .github/workflows/

# Trigger the action on push to main
on:
push:
branches:
- main

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
publish-docs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -63,11 +83,16 @@ jobs:
- run: dotnet tool update -g docfx
- run: docfx docfx_project/docfx.json

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
# Upload entire repository
path: 'docfx_project/_site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
```

## Use the NuGet Library
Expand Down