-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from PrismLibrary/docs-site
Add publish for github pages
- Loading branch information
Showing
4 changed files
with
66 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
uid: Navigation.INavigationParameters | ||
uid: Navigation.PageNavigation | ||
--- | ||
|
||
# Page Navigation | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |