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

Docker Documentation Builds #133

Merged
merged 8 commits into from
Jan 28, 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
41 changes: 41 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: deploy_dev_docs

on:
pull_request:
types: [closed]

jobs:
build_docs:
name: build_dev_docs
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
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
run: |
rm -rf doc-branch/docs/develop/
cp -r doc-branch/docs/* ./docs/
touch ./docs/.nojekyll
touch ./docs/develop/.nojekyll
rm -rf doc-branch

- name: Commit files and push
run: |
git config --local user.email "spartee@hpe.com"
git config --local user.name "Sam Partee"
git checkout -b doc
git add .
git commit -m "Update develop documentation"
git push -f origin doc

20 changes: 18 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,30 @@ check-lint:
docs:
@cd doc; make html

# help: docks - generate project documentation with docker
.PHONY: docks
docks:
@if [ -d "docs" ]; then rm -rf docs; fi
@mkdir -p docs
@docker compose build docs-dev
@docker create -ti --name devdocs smartsim-docs:dev-latest
@docker cp devdocs:/usr/local/src/SmartSim/doc/_build/html/ ./docs/develop/
@docker container rm devdocs

# help: cov - generate html coverage report for Python client
.PHONY: cov
cov:
@coverage html
@echo if data was present, coverage report is in ./htmlcov/index.html


# help: tutorials-dev - Build and start a docker container to run the tutorials
.PHONY: tutorials-dev
tutorials-dev:
@docker compose build tutorials
@docker run -p 8888:8888 smartsim-tutorials:dev-latest


# help:
# help: Test
# help: -------
Expand Down Expand Up @@ -126,5 +144,3 @@ test-cov:
.PHONY: test-full
test-full:
@python -m pytest --cov=./smartsim -vv --cov-config=${COV_FILE}


Loading