/dynamic-github-profile

A Netlify function that updates your GitHub profile repo with your latest YouTube videos

Primary LanguageJavaScript

YouTube ➡️ GitHub Readme Sync

Example screenshot, showing YouTube videos listed on my GitHub profile

A Netlify function that updates your GitHub profile repo with your latest YouTube videos. This can be adapted to other types of content, like blog posts, as well.

I created this to make my GitHub profile a bit more dynamic and interesting, and also used it as an opportunity to learn more about Netlify Functions.

Setup tutorial video

Check out the video for a run-through of the code, and setup instructions:

Click here for the tutorial video

Written instructions

  1. Fork this repository

  2. If you haven't yet, create a new repo and name it the same as your username

  3. Create a README.md to that repo, and add the following wherever you want the videos to be displayed

<!-- YT LIST START -->
<!-- YT LIST END -->
  1. Deploy the forked repo to Netlify (full walkthrough in the video)

  2. Set the following environment variables in your Netlify project settings (more info on how to create these in the video)

GITHUB_REPO=your-username/your-username
GITHUB_USERNAME=your-bot-username
GITHUB_ACCESS_TOKEN=your-bot-personal-access-token

YOUTUBE_CHANNEL_ID=your-youtube-channel-id
GOOGLE_API_KEY=your-google-api-key
  1. Call the function using something like Postman, to verify it's working

  2. Set up a YouTube webhook using Google's PubSubHubbub service

    Use the following for Topic URL: https://www.youtube.com/feeds/videos.xml?channel_id=XXXXX

  3. Et voilà! ✨