GitHub Action
PortfolioFy
Developers create hundreds of repositories, and hardly a few of them are presentable and showcased on social media/LinkedIn. This GitHub action allows you to generate your self-updating portfolio consisting of Projects, Hackathons, or maybe the latest Blogs.
An index file is pushed by this action which with the help of GitHub pages can be deployed as soon as it is committed to the repository. If you write blogs, then you can add Blog Post Workflow to the main workflow for updating your portfolio. !
-
The repositories need to have
project
topic to add to the project section andhackathon
topic to add them in the hackathon section. If you add both the topics to the same repository then it will be reflected in both sections! -
A GitHub personal access token will be needed which can be obtained by going to Settings > Developer Settings > Personal Access Tokens.
Note: If you give personal repositories access then they will be added to the sections but their links will not work
GitHub actions can be integgrated in any repository. Create a new folder called .github/workflows/<any-name>.yml
. Paste the following starter code:
name: Latest portfolio
on:
schedule:
- cron: '0 0 * * *'
# This makes the action to run at the end of every day. Customize this accordingly or you can also trigger this action for GitHub events (Pull, Push). Check GitHub actions page for that.
workflow_dispatch:
jobs:
updating-portfolio:
name: update-index-with-project
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: kaustubhgupta/PortfolioFy@main
with:
gh_token: ${{ secrets.TOKEN }} # Create a secret to store the access token
(To know more about each parameter, jump to this page in documentation)
Option | Default Value | Description | Required | Example |
---|---|---|---|---|
gh_token |
NA | GitHub Personal Access token | Yes | NA |
theme |
1 |
Level of webpage you want to render: 1 or 2 | No | 1 |
blogs |
False |
Include blogs in your Portfolio | No | True |
hackathons |
False |
Include repositories that were part of hackathon | No | True |
stats_choice |
1 |
Type of GitHub stats: 1 or 2 | No | 2 |
social_links |
False |
Links for Linkedin, Twitter, Dev.to, Medium, and Stackoverflow. | No | 'https://www.linkedin.com/in/kaustubh-gupta/, https://twitter.com/Kaustubh1828, https://medium.com/@kaustubhgupta1828, https://dev.to/kaustubhgupta, https://stackoverflow.com/users/14681298/kaustubh' |
resume_link |
False |
Link for resume pdf uploaded online | False | 'https://drive.google.com/fnskaml' |
allow_footer |
True |
Whether you want to display the credits of the creator the end of the webpage | False | False |
There is an action called Blog Post Workflow. You can easily integrate this in your workflow via this template: (Highly recommended!)
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: <Your Choice>
readme_path: index.html
template: "<h2 class='h2-blog'><a class='a-lightblue' href=$url>$title</a></h2>" # It is suggested not to modify this
gh_token: ${{ secrets.TOKEN }}
Make sure to enable the blogs parameter in the main workflow:
.
.
- uses: actions/checkout@v2
- uses: kaustubhgupta/PortfolioFy@main
with:
gh_token: ${{ secrets.TOKEN }}
blogs: True
The detailed documentation for this project is available here
-
Anurag Hazra (GitHub stats)
-
Simon Lecoq (GitHub stats)
-
Gautam Krishna R (Blogpost Action)
-
Start Bootstrap (Amazing themes)