Skip to content
home

GitHub Action

GitHub Pages Generator

v0.0.1 Pre-release

GitHub Pages Generator

home

GitHub Pages Generator

Generate website with summary of user repositories

Installation

Copy and paste the following snippet into your .yml file.

              

- name: GitHub Pages Generator

uses: adamws/github-pages-generator@v0.0.1

Learn more about this action in adamws/github-pages-generator

Choose a version

GitHub pages generator

Generate and deploy minimalistic website with your repositories statistics with GitHub Actions.

Key features:

  • lightweight, html and css only
  • responsive, mobile friendly
  • customizable and extensible

Example workflow

  • To run and deploy at 12:00pm every day:

    name: Build and deploy website
    
    on:
      push:
        branches:
          - master
      schedule:
        - cron: "0 12 * * *"
    
    jobs:
      build:
        runs-on: ubuntu-latest
        steps:
        - name: Build
          uses: adamws/github-pages-generator@master
          with:
            github_token: ${{ secrets.GITHUB_TOKEN }}
            username: ${{ github.actor }}
            output_dir: ./output
        - name: Deploy
          uses: peaceiris/actions-gh-pages@v3
          with:
            github_token: ${{ secrets.GITHUB_TOKEN }}
            publish_branch: gh-pages
            publish_dir: ./output
  • Other examples:

    assets/screenshot.png

Local usage

Clone this repository, install dependencies, build and serve:

git clone https://github.com/adamws/github-pages-generator.git && cd github-pages-generator
python -m venv .env
source .env/bin/activate
pip install -r requirements.txt
python github-pages-generator/build.py --username <<github username>>
cd output
python -m http.server

After that, open http://0.0.0.0:8000/ in browser. Files from output directory can be manually committed to gh-pages branch or your GitHub Pages repository, but it is recommended to set up automatic deployment with GitHub Actions which will trigger periodically, keeping your statistics up to date.

Rate limits

GitHub's REST API has rate limits which can be easily reached while experimenting with this tool. There are two mechanisms built-in to circumvent that: