This commit adds a GitHub Actions workflow to automate the retrieval of the daily LeetCode problem. Three jobs are defined in the workflow:
-
build-and-setup-node:
- Checks out the repository.
- Sets up Node.js environment (Node.js version 16).
- Installs project dependencies using
npm ci.
-
get-problem:
- Depends on the completion of the
build-and-setup-nodejob. - Sets up Node.js environment (Node.js version 16).
- Runs the script to fetch the daily LeetCode problem.
- Depends on the completion of the
-
commit:
- Depends on the completion of the
get-problemjob. - Checks out the repository.
- Configures Git user details.
- Commits the changes with a standardized message indicating the addition of today's daily LeetCode question.
- Pushes the changes back to the repository.
- Depends on the completion of the
This workflow is triggered daily at 1:00 AM UTC, ensuring the automated retrieval of the LeetCode problem and the documentation of the change in the repository.