Skip to content

Commit

Permalink
docs (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-garcia authored Nov 2, 2020
1 parent 59e963a commit 163c448
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: API Docs

on:
push:
branches:
- main

jobs:
docs:
name: DocFX
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: nikeee/[email protected]
name: Build Documentation
with:
args: docs/docfx.json
- uses: peaceiris/actions-gh-pages@v3
name: Publish to GitHub Pages
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_site
force_orphan: true
- name: Archive Docs
uses: actions/upload-artifact@v2
with:
name: docs
path: docs/_site

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Add the client user ip if both SendDefaultPii and IsEnvironmentUser are set. (#1015) @lucas-zimerman
* Replace Task with ValueTask where possible. (#564) @Tyrrrz
* Add support for ASP.NET Core gRPC (#563) @Mitch528
* Push API docs to GitHub Pages git GH Actions (#570) @bruno-garcia

## 3.0.0-alpha.3

Expand Down
9 changes: 1 addition & 8 deletions docs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,8 @@ set -e

if [ ! -f ./docfx/docfx.exe ]; then
echo "Installing docfx"
curl -sL https://github.com/dotnet/docfx/releases/download/v2.48.1/docfx.zip -o docfx.zip
curl -sL https://github.com/dotnet/docfx/releases/download/v2.56.4/docfx.zip -o docfx.zip
unzip -oq docfx.zip -d docfx
fi

mono ./docfx/docfx.exe docfx.json

# on Travis-CI, publish the docs
if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_PULL_REQUEST" = "false" && "$TRAVIS_BRANCH" == "main" ]]; then
git clone https://github.com/davisp/ghp-import.git &&
./ghp-import/ghp_import.py -n -p -f -m "Documentation upload" -b gh-pages -r https://"$GH_TOKEN"@github.com/getsentry/sentry-dotnet.git _site &&
echo "Uploaded documentation"
fi

0 comments on commit 163c448

Please sign in to comment.