Building Real-time Web Page Ranking Monitoring with GitHub Action

Feb 20, 2025 · 2 min read · 247 Words · -Views -Comments · Programming
Git DevOps 🇨🇳 阅读中文版
Read with AI

Choose an AI assistant

ChatGPT Open in a new tab with the article link and prompt
Claude Copy the prompt, then open Claude

Open Claude
Trouble reading the article?

If the prompt is missing, copy the full prompt below into your AI assistant. If the AI cannot read the article, paste the visible passage you want to discuss and add your question.

Recently, I had a requirement to monitor the ranking situation of a certain entry in a competition. Unfortunately, the event itself doesn’t have a ranking page, and the event data is paginated and unordered. Therefore, I thought of using GitHub Action to build a real-time web page ranking monitoring tool.

Implementation Approach

  1. Set up a GitHub Action schedule cron job, for example, execute every 10 minutes.
  2. Execute a script to request the web page’s API interface and get data information. Since I’m more familiar with JS, I use Node.js for implementation.
  3. Based on the data information, calculate ranking situations and process into needed data.
  4. Update to HTML based on the data.
  5. SSH connect to the server and upload HTML files.
  6. Meanwhile, send data to Telegram for instant IM notifications.

Final Deliverables

  1. HTML page displaying ranking information, refreshed every 10 minutes
  2. Telegram bot sending ranking information

GitHub Action Usage Notes

  1. GitHub Action’s cron expressions currently do not support timezone settings
  2. For individual accounts/organizations, non-public repositories have execution quotas - currently 2000 minutes. If exceeded, usage will be suspended Quota details: https://github.com/settings/billing/summary
    https://static.1991421.cn/2025/2025-02-20-153358.jpeg
  3. GitHub Action execution environments include macOS, which can be configured if needed

Final Thoughts

Building this entire system including development took just about an hour. I have to say GitHub Action is truly powerful, and you can create many creative solutions with it. The scheduled jobs and web scraping mentioned above are just the tip of the iceberg - there’s much more to explore in the future.

Authors
Developer, digital product enthusiast, tinkerer, sharer, open source lover