/PortfolioFy

🔥 Dynamically Self Updating Portfolio GitHub Action

Primary LanguagePythonMIT LicenseMIT

Ultimate Portfolio Maker

Dynamically Self Updating Portfolio

Developed by: Kaustubh Gupta

As a developer we create hundreds of repositories and hardly 15-20 of them actually make it to final project we deploy and showcase on social media/LinkedIn. This GitHub action allows you to generate your perfect self updating portfolio with Projects, Hackathons and latest Blogs.

An index file is generated by this action which with the help of GitHub pages gets deployed as soon as it is committed the repository. If you write blogs, then you can integrate Blog Post Workflow in our workflows to update latest blogs in your portfolio. Let's see how to setup this action!

Important note

  • The repositories need to have project topic to add them in project section and hackathon topic to add them in hackathon section. If you add both the topics to same repository then it will reflected in both sections!

  • You only need to have a GitHub personal access token which can be obtained by going to Settings > Developer Settings > Personal Access Tokens. Generate a new token and give at least give this much permissions:

Note: If you give personal repositories access then they will be added to the sections but their links will not work

Installation

Create a new folder called .github/workflows/update.yml, file name is your choice. Paste the following starter code:

name: Latest portfolio
on:
  schedule:
    # Runs at the end of every day. You can customize according to your need. You can also trigger this action for other events. Check GitHub actions page for that.
    - cron: '0 0 * * *'
  workflow_dispatch:

jobs:
  job_1:
    name: update-index-with-project
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: kaustubhgupta/PortfolioFy@v2.0.1 # If any new version is released, kindly specify that or you can directly specify @main to avoid version confusion
        with:
          gh_token: ${{ secrets.TOKEN }} # Create a secret for access token and modify the name as you wish

      - uses: test-room-7/action-update-file@v1
        with:
          file-path: |
            index.html
          commit-msg: index file added
          github-token: ${{ secrets.TOKEN }}

Note: To avoid any error & to stay in latest version of this action, replace kaustubhgupta/PortfolioFy@v2.0.1 with kaustubhgupta/PortfolioFy@main

Usage and Options available

This action generates a index.html file which is website ready. Simply enable the GitHub pages to deploy the index file and boom, you have your portfolio which self updates when you add your projects or hackathons projects!

Option Default Value Description Required
gh_token NA GitHub Personal Access token Yes
theme 1 Type of webpage you want to render No
blogs False Whether you want to include blogs in your Portfolio No
hackathons False Apart from Personal projects you can include hackathon projects No
stats_choice 1 Which type of GitHub stats you want to display in your profile No

Add Blog Updates

There is an action called Blog Post Workflow which updates latest blogpost on schedule. You can easily integrate this in your workflow via this method: (I highly recommend to use this!)

name: Latest blog post workflow
on:
  push: # Every time index.html is pushed, this action runs and updates the blogs section!

jobs:
  update-readme-with-blog:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: gautamkrishnar/blog-post-workflow@master
        with:
          feed_list: <Your feedlist>
          max_post_count: 7
          readme_path: index.html
          template: "<h2 class='h2-blog'><a class='a-lightblue' href=$url>$title</a></h2>" # Do not change the template as it will not render good results!
          gh_token: ${{ secrets.TOKEN }}

Do enable the blogs parameter in the main workflow too!

.
.
.
- uses: actions/checkout@v2
        - uses: kaustubhgupta/PortfolioFy@v2.0.1 # If any new version is released, kindly specify that or you can directly specify @main to avoid version confusion
          with:
            gh_token: ${{ secrets.TOKEN }} # Create a secret for access token and modify the name as you wish
            blogs: True

Add Hackathon

Starting version v2.0.1, hackathon is optional to be included in the portfolio. By default, it is False but you can enable it in the workflow as:

.
.
.
- uses: actions/checkout@v2
        - uses: kaustubhgupta/PortfolioFy@v2.0.1 # If any new version is released, kindly specify that or you can directly specify @main to avoid version confusion
          with:
            gh_token: ${{ secrets.TOKEN }} # Create a secret for access token and modify the name as you wish
            hackathons: True

GitHub Stats Choice

From version v2.0.1, you can choose between two types of stats generation. The basic one looks like this, choice 1: (Made by Anurag Hazra)


Stats Choice 2 gives detailed report of the profile: (Made by Simon Lecoq )

Do star the repository! It gives me motivation to develop more projects like this!

Multiple Themes

You can select any of the themes depending upon your usage.

Theme 1

This is a basic level theme.

Theme 2

This is an advanced theme provided by Start Bootstrap. It is fully interactive, good looking and more responsive than first in mobile devices.

Special Mentions

A special thanks to:

Create blogs, videos and tag me! I will definitely have a look and feature them here!

Featured Content

License

MIT Licence