Skip to content

Commit

Permalink
Merge pull request #128 from PrismLibrary/docs-site
Browse files Browse the repository at this point in the history
Add publish for github pages
  • Loading branch information
dansiegel authored Feb 15, 2024
2 parents 574d653 + 7fcf152 commit 79955f6
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 10 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build Docs
on:
push:
branches: [ master ]

jobs:
build-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: nikeee/[email protected]
name: Build Documentation
with:
args: docfx.json
- uses: actions/upload-artifact@v2
with:
name: docs
path: _site

publish-docs:
needs: build-docs
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: 'gh-pages'

- name: Download artifact
uses: actions/download-artifact@v2
with:
name: docs

- name: Delete old docs
run: rm -rf *

- name: Unpack new docs
run: tar -xzf docs.tar.gz

- name: Commit and push
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
if git diff --quiet --cached; then
echo 'No changes to commit'
else
git commit -m "Update docs"
git push
fi
17 changes: 8 additions & 9 deletions docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"content": [
{
"files": [
"docs/**.md",
"docs/**/toc.yml",
"**/*.md",
"**/toc.yml",
"toc.yml",
"*.md"
],
Expand All @@ -19,17 +19,16 @@
"resource": [
{
"files": [
"index.html",
"images/**",
"docs/images/**",
"docs/getting-started/images/**",
"docs/maui/images/**",
"docs/wpf/legacy/images/**",
"docs/wpf/images/**",
"docs/xamarin-forms/images/**",
"docs/xamarin-forms/getting-started/images/**",
"docs/xamarin-forms/platform-reference/images/**"
"docs/platforms/maui/images/**",
"docs/platforms/wpf/images/**",
"docs/platforms/xamarin-forms/images/**"
],
"exclude": [
".github/**",
".vscode/**",
"obj/**",
"_site/**"
]
Expand Down
2 changes: 1 addition & 1 deletion docs/navigation/page-navigation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
uid: Navigation.INavigationParameters
uid: Navigation.PageNavigation
---

# Page Navigation
Expand Down
5 changes: 5 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<html>
<head>
<meta http-equiv="refresh" content="0; URL=docs/" />
</head>
</html>

0 comments on commit 79955f6

Please sign in to comment.