Transform Your GitHub Profile with a 3D Contribution Calendar
Tired of the same old flat GitHub profile? Want to showcase your contributions in a visually stunning way? This guide shows you how to use the github-profile-3d-contrib
action to create a dynamic, eye-catching 3D contribution calendar. Boost your profile's appeal and stand out from the crowd!
What is github-profile-3d-contrib
?
This GitHub Action automatically generates a 3D visualization of your GitHub contribution activity, turning your profile into an interactive work of art.
Benefits:
- Visually Appealing: Dramatically improves your profile's aesthetics.
- Showcase Activity: Highlights your contributions in a unique format.
- Easy Integration: Simple setup using GitHub Actions.
Basic Setup: Creating Your 3D Profile
Here's how to quickly set up your 3D contribution calendar using GitHub Actions:
-
Create a Special Repository: Name it the same as your GitHub username. For example, if your username is "octocat," create a repository named "octocat/octocat." This is where your profile README lives.
-
Create a Workflow File: Add a
.github/workflows/profile-3d.yml
file to your repository with the following content:- Schedule: The
cron
setting determines when the action runs. "0 18 * * *" means 6:00 PM UTC daily. Adjust to your preferred time.
- Schedule: The
-
Manually Trigger: Go to your repository's "Actions" tab, select "GitHub-Profile-3D-Contrib," and click "Run workflow."
-
Add Image to README: In your
README.md
file, include the generated image using the following markdown:
Environment Variables: Customize Your Calendar
Fine-tune your 3D calendar with environment variables:
GITHUB_TOKEN
(Required): A GitHub access token. Use${{ secrets.GITHUB_TOKEN }}
for public repos. For private contributions, create a personal access token and store it as a secret (e.g.,MY_PERSONAL_ACCESS_TOKEN
). Then use${{ secrets.MY_PERSONAL_ACCESS_TOKEN }}
.USERNAME
(Required): Your GitHub username, or the target user.MAX_REPOS
(Optional): maximum number of repositories, default is 100.SETTING_JSON
(Optional): Path to customized settings.GITHUB_ENDPOINT
(Optional): Custom GitHub GraphQL Endpoint.YEAR
(Optional): Target specific year for calendar.
GITHUB_TOKEN Explained
GitHub automatically creates a special GITHUB_TOKEN
for actions. This token is sufficient for generating contribution calendars for public repositories.
Private Repository Access
To include private repository activity:
-
Enable "Include private contributions on my profile" in your GitHub profile settings.
-
Create a Personal Access Token with appropriate permissions. Remember, secrets cannot start with
GITHUB_*
. -
Store the token as a repository secret (e.g.,
MY_PERSONAL_ACCESS_TOKEN
). -
Update your workflow file:
Available 3D Calendar Styles
Choose from several pre-designed styles to suit your preference:
profile-green-animate.svg
profile-green.svg
profile-season-animate.svg
(Northern Hemisphere)profile-season.svg
(Northern Hemisphere)profile-south-season-animate.svg
(Southern Hemisphere)profile-south-season.svg
(Southern Hemisphere)profile-night-view.svg
profile-night-green.svg
profile-night-rainbow.svg
profile-gitblock.svg
profile-customize.svg
- If using aSETTING_JSON
file
Advanced Usage
Explore EXAMPLES.md
(linked in the original documentation) for more advanced customization options.
Local Usage (For Developers)
For local development and testing:
-
Set the
GITHUB_TOKEN
environment variable: -
Run the script:
or
Licence
This project is released under the MIT License. (C) 2021 SATO, Yoshiyuki.