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/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 diff --git a/environment.yml b/environment.yml new file mode 100644 index 000000000..18b983123 --- /dev/null +++ b/environment.yml @@ -0,0 +1,12 @@ +name: qe-lectures +channels: + - default +dependencies: + - python=3.8 + - anaconda=2020.07 + - pip + - pip: + - interpolation + - sphinxcontrib-jupyter + - sphinxcontrib-bibtex + - joblib \ No newline at end of file