Skip to content

HugoBlox/gh-action-updater

Repository files navigation

Hugo Updater 🚀

A GitHub Action to automatically update Hugo sites (WIP).

🔧 Usage

- name: Update Hugo content with RSS feed
  uses: HugoBlox/gh-action-updater@v2
  with:
    feed-url: 'https://example.com/feed.xml'
    readme-section: 'recent-posts'
    max: 5
    template: '* [{{ title }}]({{ link }})'
    github_token: ${{ secrets.GITHUB_TOKEN }}
    branch: main
    message: 'docs: update recent posts'

📝 Inputs

Input Required Default Description
feed-url Yes - RSS feed URL to fetch content from
readme-section Yes - Section in README to update
max No 5 Maximum number of RSS feed items to include
template No * [{{ title }}]({{ link }}) Markdown template for each item
github_token No ${{ github.token }} GitHub token for authentication
branch No Default branch Target branch to update
message No docs: update Commit message

🛠 Development

Prerequisites

  • Node.js 20 or later
  • npm

Setup

npm install

Build

npm run build

Clean

npm run clean

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run npm run build to ensure the action compiles
  5. Create a pull request

📄 License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published