From f7df3df3e9b2245a0ccfc6c46029a630037112e1 Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Fri, 19 Jul 2024 12:34:53 +0200 Subject: [PATCH] Github workflows and test --- .../.github/workflows/main.yml | 35 +++++++++++++++ smartcitizen-data-books/analysis/test.ipynb | 43 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 smartcitizen-data-books/.github/workflows/main.yml create mode 100644 smartcitizen-data-books/analysis/test.ipynb diff --git a/smartcitizen-data-books/.github/workflows/main.yml b/smartcitizen-data-books/.github/workflows/main.yml new file mode 100644 index 0000000..d14f4a7 --- /dev/null +++ b/smartcitizen-data-books/.github/workflows/main.yml @@ -0,0 +1,35 @@ +name: Deploy to Github Pages + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Setup Python + uses: actions/setup-python@v1 + with: + python-version: '3.8' + architecture: 'x64' + + - name: Install dependencies + run: | + pip install -r requirements-deploy.txt + + - name: Build the book + run: | + pip freeze + pip --version + python --version + jupyter-book build . + + - name: Deploy + if: github.ref == 'refs/heads/main' + uses: peaceiris/actions-gh-pages@v3.6.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./_build/html diff --git a/smartcitizen-data-books/analysis/test.ipynb b/smartcitizen-data-books/analysis/test.ipynb new file mode 100644 index 0000000..5fa7aba --- /dev/null +++ b/smartcitizen-data-books/analysis/test.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "id": "b011cb00-5cd0-420e-a87c-047257db7906", + "metadata": {}, + "outputs": [], + "source": [ + "import scdata as sc" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "f0ef2104-6708-4720-9acf-6b1897c761e3", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.7" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}