About this project

This project provides an automated crawling and archiving solution based on GitHub Actions for scenarios requiring continuous and timely collection of environmental data. The README states that the approach is inspired by HeQinWill/CNEMC, with enhancements in scheduling and stability. It currently primarily supports CNEMC real-time environmental monitoring data updates, with planned features including 10-minute interval Himawari satellite Shortwave Radiation (SWR) data. Crawled results are archived as CSV files by date. Users can quickly load hourly data via raw.githubusercontent links or obtain the file list for a specific day through the GitHub Contents API. A core objective is to avoid potential delays or missed triggers associated with native GitHub Actions cron; therefore, external timed triggers are recommended: using a cloud function to periodically call the official GitHub Workflow Dispatch interface to remotely trigger a specified workflow. Regarding configuration, an Actions secret named GTOKEN must be set in the project repository with a Personal Access Token as its value. The Personal Access Token must be of the 'classic' type with 'repo' and 'workflow' permissions checked; without workflow permissions, the workflow_dispatch cannot be triggered via API. As for the cloud function platform, the README indicates that Tencent Cloud Function (SCF) has been verified, although theoretically, any platform supporting HTTP requests and timed triggers can deploy a similar solution. During deployment, it is suggested to write key parameters such as repo_owner, repo_name, and workflow_name directly as string constants or hard-code them to avoid parameter loss, environment variable parsing failures, or exceptions caused by passing parameters via event/context. The example code uses 'requests' to send a POST request to the GitHub API with a payload of ref=main, expecting a success status code of 204.