Created
August 12, 2025 21:41
-
-
Save walice/946b036a92701bace2d92b6364b60f4e to your computer and use it in GitHub Desktop.
GitHub deployment section of a Jupyter notebook that is converted into a self-updating webpage. Full tutorial available at: https://alicelepissier.com/programming/automated-notebook.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": 16, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "# Create daily commit message\n", | |
| "now = datetime.datetime.now()\n", | |
| "commit_message = \"Last scraped on \" + str(now)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "# Deploy to GitHub\n", | |
| "! git add .\n", | |
| "! echo $commit_message > commit_message.txt\n", | |
| "! git commit -F commit_message.txt\n", | |
| "! git push" | |
| ] | |
| } | |
| ], | |
| "metadata": {}, | |
| "nbformat": 4, | |
| "nbformat_minor": 4 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment