DEV Community

loading...
Cover image for JSON Resume to GitHub Pages

JSON Resume to GitHub Pages

Rajiv Nayan Choubey
A tech enthusiast who wants to learn the working of world, from scratch. C/C++ | Python | MERN | Deep Learning. Loves to solve complex problems,
・1 min read

My Workflow

This GitHub action, resume-creator-action, is used to create a workflow which will generate Resume HTML Page published on GitHub pages from JSON file (containing all the information). It is very easy to setup. In a few lines of .yml file and your data in a JSON file following a specific syntax, you will be able to publish your resume to GitHub Pages and share with the world. This is my first submission for GitHub Actions Hackathon.

Screenshot

Submission Category:

This submission lies under Wacky Wildcards

Yaml File or Link to Code

I created a GitHub action from scratch and its repository is shown below:

GitHub logo rajivnayanc / resume-creator-action

Creates Resume HTML Page from JSON File and host it on Github Pages

Resume Creator from JSON

Creates Resume Github Page from JSON using Github Actions.

Prerequisite

  • GitHub Personal Access Token ACCESS_TOKEN
  • resume.json to build the Resume HTML Page from. (Syntax)

Usage

  1. Set up credentials as secrets in you repository using ACCESS_TOKEN
  2. Following should be added to your workflow on your repositories:
 - name: Build Resume and Deploy on GitHub Pages
        uses: rajivnayanc/resume-creator-action@v4
        with
          FileName: path/to/resume.json
        env:
          ACCESS_TOKEN: ${{secrets.ACCESS_TOKEN}}

Inputs

  • ACCESS_TOKEN : Required GitHub Personal Access token. Can also be stored in environment.
  • FileName : Required Path to the resume JSON file in your repository. It should be provided in with .

Result

HTML Page according to the JSON file provided and hosted on the gh-pages branch

Syntax for resume.json

  1. Root part of the JSON document should be a JSON Object with three keys: "name", "header", and "content".
  2. "name" stores the name of the Person whose resume is created.
  3. "header" stores the basic…

Sample YML for use for your own workflow is shown below:

name: Resume Creator from JSON
on:
  push:
    branches:
      - master
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout πŸ›ŽοΈ
        uses: actions/checkout@v2.3.1
        with:
          persist-credentials: false
      - name: Build Resume and Deploy on GitHub Pages πŸš€
        uses: rajivnayanc/resume-creator-action@v1.1.0
        with:
          FileName: resume.json
        env:
          ACCESS_TOKEN: ${{secrets.ACCESS_TOKEN}}
Enter fullscreen mode Exit fullscreen mode

Additional Resources / Info

To test the above GitHub action, I created the example shown below. I provided the resume.json file and the GitHub action turned it into the HTML page and published on GitHub page of that repository.

GitHub logo rajivnayanc / resume-creator-example

Example of @rajivnayanc /resume-creator-action : A GitHub Action Hackathon Dev.to project

I loved GitHub actions and will come up with more interesting workflows and projects.

Thank You! Happy Coding!
😍

Discussion (2)

Collapse
andrewbaisden profile image
Andrew Baisden

Cool idea to try.

Collapse
shunjid profile image
Shunjid Rahman Showrov

Excellent idea !!

Forem Open with the Forem app