Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build_docs github action + some minor improvements #143

Merged
merged 1 commit into from
Feb 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
Empty file added .docs_static/.nojekyll
Empty file.
1 change: 1 addition & 0 deletions .docs_static/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
www.craylabs.org
2 changes: 2 additions & 0 deletions .docs_static/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

<meta http-equiv="refresh" content="0; url=./docs/overview.html" />
31 changes: 17 additions & 14 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: deploy_dev_docs

on:
pull_request:
types: [closed]
push:
branches:
- develop

jobs:
build_docs:
Expand All @@ -14,28 +15,30 @@ jobs:
with:
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.

- name: build documentation with docker
run: make docks

- uses: actions/checkout@v2
with:
ref: doc
path: doc-branch

- name: Move over release docs and stubs
- name: Copy over other doc versions from doc branch
run: |
rm -rf doc-branch/docs/develop/
mkdir -p ./docs
cp -r doc-branch/docs/* ./docs/
touch ./docs/.nojekyll
touch ./docs/develop/.nojekyll
rm -rf doc-branch

- name: Commit files and push
- name: build documentation with docker
run: make docks

- name: Commit files
run: |
git config --local user.email "spartee@hpe.com"
git config --local user.name "Sam Partee"
git checkout -b doc
git add .
git add -A
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Update develop documentation"
git push --force --quiet "https://spartee:${{ secrets.DOC_PA_TOKEN }}@github.com/CrayLabs/SmartSim" doc:doc

- uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: doc
force: true
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,13 @@ docs:
# help: docks - generate project documentation with docker
.PHONY: docks
docks:
@if [ -d "docs" ]; then rm -rf docs; fi
@rm -rf docs/develop
@mkdir -p docs
@docker compose build --progress=plain docs-dev
@docker create -ti --name devdocs smartsim-docs:dev-latest
@docker cp devdocs:/usr/local/src/SmartSim/doc/_build/html/ ./docs/develop/
@docker cp devdocs:/usr/local/src/SmartSim/doc/_build/html/ ./docs/develop
@docker container rm devdocs
@cp -r .docs_static/. ./docs/

# help: cov - generate html coverage report for Python client
.PHONY: cov
Expand Down
Empty file added doc/_static/.nojekyll
Empty file.