Arne  Denesik

Arne Denesik

1604199780

Convert Your Jupyter-notebook to Github pages with Github-action

As a data scientist and machine learning engineering, the Jupyter notebook is handy tools you can use.

How cool if you convert that notebook into a blog within less than 5 min?

And now this is possible with Github action and Fastpages templates.

You can find a live demo here.

1. Requirement

2. Step to follow

  • open Github account and use fastpages templates you can find a link here.

Image for post

  • Within 30 sec one pull request is generated by Github-action. Follow steps before you merge the pull request.

Image for post

  • Make sure you check this Allow write access.
  • Merge pull request and wait until Github-action makes Github pages.
  • Now you find a link in your Github repo readme file where you can find demo posts.

#github-pages #jupyter-notebook #github-actions #data-science #markdown

What is GEEK

Buddha Community

Convert Your Jupyter-notebook to Github pages with Github-action
Arne  Denesik

Arne Denesik

1604199780

Convert Your Jupyter-notebook to Github pages with Github-action

As a data scientist and machine learning engineering, the Jupyter notebook is handy tools you can use.

How cool if you convert that notebook into a blog within less than 5 min?

And now this is possible with Github action and Fastpages templates.

You can find a live demo here.

1. Requirement

2. Step to follow

  • open Github account and use fastpages templates you can find a link here.

Image for post

  • Within 30 sec one pull request is generated by Github-action. Follow steps before you merge the pull request.

Image for post

  • Make sure you check this Allow write access.
  • Merge pull request and wait until Github-action makes Github pages.
  • Now you find a link in your Github repo readme file where you can find demo posts.

#github-pages #jupyter-notebook #github-actions #data-science #markdown

A Simple Guide to Github Page Deployment

Long story short: Jekyll is a template engine changing

markdowndocuments on staticHTMLwebpages, that you can then host anywyere, because you don’t need databases or server that has PHP or Python.

Usual Process

Normally the process of adding new post looks like this:

  • I write markdown document with setting parameters like title, date and tags
  • when I’m happy with what I wrote (never), I commit changes and push it to repository on GitHub. Repository name comes from my nick and is also address for blog asvid.github.io
  • Github after pushing to branch master builds website from sources using Jekyll - probably something like running jekyll build
  • result of Jekyll build is not present in a repository, but you see it right now after visiting bloga page

#github-pages #github-page-with-jekyll #jekyll #github-actions #github #deployment #continuous-deployment #web-development

Oral  Brekke

Oral Brekke

1617437520

Deploying my portfolio website on Github Pages using Github Actions.

I recently deployed  my portfolio site and wanted to try out github actions and this is my experience of automating the deployment.

This article is more focused on how you can use the GitHub actions and how easy it is to deploy your code to GitHub pages rather than the portfolio site code.So every time you make an update or build to your website ,the changes are automatically reflected and this automated deploying process makes work much faster.

The way GitHub action works is you create actions in your repositories by creating one or more yaml files and these are called workflows.Workflows now can handle build tasks like CI CD. This means you use the action to test your code and push the site to the desired hosting platform (in this case GitHub pages ) when the main branch changes .

First step assuming that you have a GitHub account is to create a repository having your website code in it.Now I have a bootstrap website but in the future I do plan on adding node JS so I already added package.json.

#workflow #portfolio #github #github-actions #github-pages

How to Convert Jupyter Notebooks into PDF

If you’re one of many data scientists looking for a job, you might find yourself working on a data science take-home assignment. Instead of sharing your Jupyter Notebooks, it would be neater if you could convert the notebooks and submit the pdf version. In this blog, I want to share how you can turn Jupyter Notebooks into pdf format in a few lines!

Install nbconvert and LaTeX

nbconvert allows users to convert Notebooks to other formats. You would think after installing nbconvert, and you are good to go…right? If it’s that simple, why would I be writing this post?

After I installed nbconvert, I received an error saying “500: Internal Server Error.” The reason why you see this error is that you will need to install LaTeX or Pandoc as well. I decided to download LaTeX. The good thing about downloading LaTeX is that it makes your analysis look like a research paper, which is very legit.

#template #convert #jupyter-notebook #jupyter #python

Multiple Environments With GitHub Pages

Or… When you’re working on a static site and GitHub Pages feels like the perfect hosting solution, since you like having everything in one place and then you realize you need an additional environment but you still don’t want to use anything but GitHub… Here’s what you can do.

This is a “special needs” article but also a general introduction to GitHub Actions.

Since the advent of Single Page Applications the requirements for hosting have been reduced to a minimum. Anything that can serve a static HTML file will do the job just fine and the browser, bombarded with Javascript, does the heavy lifting. High availability and security is a totally different topic of course but in this case I believe GitHub has you covered.

With Pages GitHub offers a very convenient service for hosting such an app. You push to your repository and GitHub updates the deployment for you. You even get a nice subdomain like username.github.io or you can connect your own domain. There’s just one downside.

If your project is not just a literally very static website but an actual “app” and you are working together with other people, you probably want to have multiple deployments, like a development and a staging environment. The problem is… A repository on GitHub can only have a single GitHub Page instance and you probably don’t want to maintain a mirror repository for each of your environments, so you’ll end up using an external hosting service and then you start questioning GitHub Pages as your preferred hosting solution all together. In this article I will show you what I did to “stay on GitHub“.

GitHub Actions & Workflows

Not only does GitHub offer free hosting but also free and pretty flexible and powerful workflow automation with  GitHub Actions. If you are not already familiar with CI/CD and GitHub Actions in particular, I recommend you to change that asap. I ignored this topic for far too long but now I’m a huge fan. It simply gives you superpowers.

I’ll try to give you a brief but effective introduction:

GitHub runs virtual machines that act as task runners for your projects. Those tasks can either run on a schedule, as a cronjob, or get  triggered by events that occur on GitHub, like pushing commits to a branch, opening or closing issues or commenting on them, to name some common ones. These tasks can be comprised of multiple steps that can be chained together and depend on one another, hence the term Workflows. The terminology is the following: Workflows have one or more jobs, each with one or more steps, which can make use of an action, which can have inputs and outputs.

Actions are the “atoms” a workflow is made of, so to say. An action is a repository on GitHub, containing an action.yml file, describing its inputs and outputs. That means an action can basically do anything you want. It is worth mentioning though, that you actually don’t even have to use actions in your workflows at all. You can also just run arbitrary commands on the operating system the workflow runs on and sometimes that is all you need. You can think of GitHub Workflows simply as… “executing stuff” on a virtual machine that GitHub spawns for you on demand.

#github-actions #github #github-pages