From 86cce07f4eb3373d105c69b099f5c39660c0ddc5 Mon Sep 17 00:00:00 2001 From: mmcky Date: Fri, 2 Oct 2020 15:57:53 +1000 Subject: [PATCH 1/3] add ci builds --- .github/workflows/ci.yml | 53 ++++++++++++++++++++++++++++++++++++++++ environment.yml | 12 +++++++++ 2 files changed, 65 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 environment.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..95cac53af --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,53 @@ +name: Build Project [myst] +on: [push] +jobs: + tests: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Anaconda + uses: goanpeca/setup-miniconda@v1 + with: + auto-update-conda: true + auto-activate-base: true + miniconda-version: 'latest' + python-version: 3.8 + environment-file: environment.yml + activate-environment: qe-lectures + - name: Install sphinxcontrib-tomyst + shell: bash -l {0} + run: | + git clone https://github.com/QuantEcon/sphinxcontrib-tomyst + cd sphinxcontrib-tomyst && python setup.py install + - name: Install quantecon-book-theme + shell: bash -l {0} + run: | + git clone https://github.com/QuantEcon/quantecon-book-theme + cd quantecon-book-theme + python setup.py install + - name: Install Dependencies + shell: bash -l {0} + run: | + pip install myst-nb + - name: Display Conda Environment Versions + shell: bash -l {0} + run: conda list + - name: Display Pip Versions + shell: bash -l {0} + run: pip list + - name: Build HTML + shell: bash -l {0} + run: | + pwd + make html + - name: Preview Deploy to Netlify + uses: nwtgck/actions-netlify@v1.1 + with: + publish-dir: '_build/html/' + production-branch: master + github-token: ${{ secrets.GITHUB_TOKEN }} + deploy-message: "Preview Deploy from GitHub Actions" + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} \ No newline at end of file diff --git a/environment.yml b/environment.yml new file mode 100644 index 000000000..ce9a617c1 --- /dev/null +++ b/environment.yml @@ -0,0 +1,12 @@ +name: qe-lectures +channels: + - default +dependencies: + - python=3.7 + - anaconda=2020.02 + - pip + - pip: + - interpolation + - sphinxcontrib-jupyter + - sphinxcontrib-bibtex + - joblib \ No newline at end of file From 4a7c1219d0d43d421582e7d922d4278f096bf98e Mon Sep 17 00:00:00 2001 From: mmcky Date: Fri, 2 Oct 2020 16:03:37 +1000 Subject: [PATCH 2/3] update conf --- conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf.py b/conf.py index 67aade4d3..698812814 100644 --- a/conf.py +++ b/conf.py @@ -131,7 +131,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'qe-lectures' +html_theme = 'quantecon_book_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the From 47d6d5bb10d34e5b548ffdae2d9127acf73925d2 Mon Sep 17 00:00:00 2001 From: mmcky Date: Fri, 2 Oct 2020 16:08:13 +1000 Subject: [PATCH 3/3] update environment with newest anaconda --- environment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index ce9a617c1..18b983123 100644 --- a/environment.yml +++ b/environment.yml @@ -2,8 +2,8 @@ name: qe-lectures channels: - default dependencies: - - python=3.7 - - anaconda=2020.02 + - python=3.8 + - anaconda=2020.07 - pip - pip: - interpolation