Skip to content

Commit 3956d99

Browse files
committed
Adding github actions workflow to deploy notebook
1 parent 2868222 commit 3956d99

File tree

2 files changed

+44
-4
lines changed

2 files changed

+44
-4
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy Notebook to Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout content
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.x'
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install jupyter nbconvert pandas numpy matplotlib seaborn scikit-learn
27+
28+
- name: Convert Notebook to HTML
29+
run: |
30+
jupyter nbconvert --to html tanush_analysis.ipynb --output index.html
31+
32+
- name: Deploy to GitHub Pages
33+
uses: peaceiris/actions-gh-pages@v3
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: ./
37+
publish_branch: gh-pages
38+
keep_files: true
39+
exclude_assets: '.github,*.md,*.csv,*.txt,venv'
40+

tanush_analysis.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,7 @@
11981198
"cell_type": "markdown",
11991199
"metadata": {},
12001200
"source": [
1201-
"## 2.4 Species-Island Association\n",
1201+
"## 2.4 Species Island Association\n",
12021202
"\n",
12031203
"Geographical distribution patterns can reveal ecological preferences and inform conservation strategies. Understanding which species are associated with which islands provides critical insights for both scientific research and practical field identification.\n",
12041204
"\n",
@@ -1218,7 +1218,7 @@
12181218
},
12191219
{
12201220
"cell_type": "code",
1221-
"execution_count": 73,
1221+
"execution_count": null,
12221222
"metadata": {},
12231223
"outputs": [
12241224
{
@@ -1269,8 +1269,8 @@
12691269
"plt.tight_layout()\n",
12701270
"plt.show()\n",
12711271
"\n",
1272-
"# Species-Island Associations\n",
1273-
"print(\" Species-Island Associations:\")\n",
1272+
"# Species Island Associations\n",
1273+
"print(\" Species Island Associations:\")\n",
12741274
"print(f\" • WildRambler: Predominantly on Skye ({crosstab.loc['WildRambler', 'Skye']} observations) this is interesting as we can see that the species is more likely to be found on Skye than the other islands\")\n",
12751275
"print(f\" • BogSniffler: Primarily on Shetland ({crosstab.loc['BogSniffler', 'Shetland']} observations) this is interesting as we can see that the species is more likely to be found on Shetland than the other islands\")\n",
12761276
"print(f\" • Macduff: Distributed across all islands (most generalist species)\")\n",

0 commit comments

Comments
 (0)