This GitHub Action automatically updates a landing page with a list of GitHub repositories. It fetches repositories for a specified user, then updates an HTML file with repository links. Configurable via environment variables, it's ideal for keeping project documentation or personal pages dynamically updated.
MIT License
This GitHub Action automatically queries your GitHub repositories and updates an HTML file (your landing page) with a list of these repositories. It's configurable to run on a schedule or in response to specific GitHub events.
I started this project so that I could create a landing page on my GitHub.io website. Then use that to link to projects and websites throughout my account.
These instructions will guide you through setting up and running the action on your own repository.
Clone the repository:
git clone https://github.com/thomasthaddeus/UpdateRepositoryList.git
Set up the environment variables:
Create a .env
file in your project root and add the following:
MY_GITHUB_USERNAME=your-github-username
MY_GITHUB_TOKEN=your-github-token
To run and test the script locally, follow these steps:
Install dependencies:
npm install
Run the script:
npm run start
Clone the Repository
Clone this repository into your GitHub account.
Configure Environment Variables
.env
file at the root of your project..env
file:MY_GITHUB_USERNAME=your-username
MY_GITHUB_TOKEN=your-personal-access-token
GitHub Secrets
For production use, set your GitHub username and personal access token as secrets in your repository settings:
MY_GITHUB_USERNAME
MY_GITHUB_TOKEN
(your PAT)Set Secrets:
Add MY_GITHUB_USERNAME
and MY_GITHUB_TOKEN
as secrets in your GitHub repository settings.
Workflow Configuration:
Edit .github/workflows/main.yml
to configure the triggers for running the action.
Customize Landing Page Template
Modify the HTML templates in the templates
directory as needed to fit the design of your landing page.
HTML_FILE_PATH
environment variable.Once set up, the action will run according to the triggers defined in your workflow file. You can customize the triggers in the .github/workflows/main.yml
file.
To ensure the reliability of the code, you can run the included tests:
npm test
This will execute the test cases defined in the __tests__
directory using Jest.
We welcome contributions to this project! Whether it's bug fixes, feature additions, or improvements in documentation, your help is appreciated. Here's how you can contribute:
git checkout -b feature/YourAmazingFeature
.git commit -m 'Add some amazing feature'
.git push origin feature/YourAmazingFeature
.If you encounter any issues or have suggestions for improvements, please report them using the repository's issue tracker.
This project is licensed under the MIT License - see the LICENSE file for details.