Skip to content

Commit

Permalink
Merge pull request #542 from jacebrowning/deploy-site
Browse files Browse the repository at this point in the history
Deploy static site
  • Loading branch information
jacebrowning committed Nov 3, 2020
2 parents aeaebdb + 3773426 commit 9ef7d6a
Show file tree
Hide file tree
Showing 7 changed files with 200 additions and 16 deletions.
12 changes: 8 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
- checkout

- run:
name: Checking System Dependencies
name: Checking system dependencies
command: make doctor

- type: cache-restore
key: poetry-{{ checksum "poetry.lock" }}

- run:
name: Installing Project Dependencies
name: Installing project dependencies
command: make install

- type: cache-save
Expand All @@ -27,15 +27,19 @@ jobs:
- .venv

- run:
name: Checking Code
name: Checking code
command: make check

- run:
name: Running Tests
name: Running tests
command: make test && sudo pip install coveralls && coveralls

- store_test_results:
path: results

- store_artifacts:
path: htmlcov

- run:
name: Building site
command: make site
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"cSpell.words": [
"CIRCLECI",
"Kombucha",
"Memegen",
"aiofiles",
"aiohttp",
"jsonify",
Expand Down
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,20 @@ watch: install
@ sleep 2 && touch */__init__.py &
@ poetry run watchmedo shell-command --recursive --pattern="*.py;*.yml" --command="clear && make test check format SKIP_SLOW=true && echo && echo ✅ && echo" --wait --drop

.PHONY: site
site: install
ifdef CI
poetry run mkdocs build --strict
ifeq ($(CIRCLE_BRANCH),main)
@ echo
git config --global user.name CircleCI
echo site.memegen.link > site/CNAME
poetry run mkdocs gh-deploy --dirty
endif
else
poetry run mkdocs serve
endif

###############################################################################
# Delivery Tasks

Expand Down
1 change: 1 addition & 0 deletions docs/index.md
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
site_name: Memegen API
remote_branch: site
183 changes: 171 additions & 12 deletions poetry.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ locust = "^1.2.3"
# Coverage
coveragespace = "^3.1.1"

# Documentation
mkdocs = "^1.0"

# Utilities
ipdb = "*"
rope = "^0.14.0"
Expand Down

0 comments on commit 9ef7d6a

Please sign in to comment.