Skip to content

Commit

Permalink
Albop/docs ci (#196)
Browse files Browse the repository at this point in the history
* Try to make mkdocs automatic.

* DOC: Add python 3.7

* mkdocs file missing

* FIX: dependencies

* Try to trust poetry

* Trying with custom action

* Using github action to install poetry

* Another try

* Multi-line command.

* Better bash

* Better bash

* Better bash

* Better bash

* Added cocs_ci

* *!*!*!*!

* This should work

* Trying to check token stuff.

* We build the documentation only on master.
  • Loading branch information
albop authored Apr 29, 2020
1 parent a2e4cf9 commit 340415e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Publish docs via GitHub Pages

on:
on: push
push:
branches:
- master
Expand All @@ -13,8 +13,21 @@ jobs:
- name: Checkout master
uses: actions/checkout@v1

- name: Deploy docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Install Poetry
uses: Gr1N/setup-poetry@v2

- name: Deploy docs (1)
run: |
git config --global user.name "albop"
git config --global user.email "[email protected]"
git remote rm origin
git remote add origin https://x-access-token:${PERSONAL_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
poetry install
poetry run mkdocs gh-deploy --config-file ${GITHUB_WORKSPACE}/mkdocs.yml --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# CUSTOM_DOMAIN: optionaldomain.com
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,12 @@ scipy = "^1.4.1"
quantecon = "^0.4.7"
xarray = "^0.15.1"
multipledispatch = "^0.6.0"
mkdocs = "^1.1"
pymdown-extensions = "^7.1"
python-markdown-math = "^0.6"


[tool.poetry.dev-dependencies]
pytest = "^5.2"
mkdocs = "^1.1"
pymdown-extensions = "^7.1"
python-markdown-math = "^0.6"

[build-system]
requires = ["poetry>=0.12"]
Expand Down

0 comments on commit 340415e

Please sign in to comment.