Skip to content

RndmCodeGuy20/Daily-LC-Problem-Action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Get Daily LeetCode Problem

Get Daily LeetCode Problem is a node.js script that will get the daily problem from LeetCode and create a markdown file with the problem description and the link to the problem.

Also, it will create a folder with the name of the problem and a file with the solution template.

Installation

  1. Create a .github\workflows folder in your repository.
./project root
└── .github
    └── workflows
  1. Create a daily-leetcode-problem.yml file in the .github\workflows folder.
./project root
└── .github
    └── workflows
        └── daily-leetcode-problem.yml
  1. Copy the following code into the daily-leetcode-problem.yml file.
name: Get Daily LeetCode Problem

on:
  schedule:
    - cron: "0 1 * * *"
  workflow_dispatch: # Manually trigger the workflow - 🔮 you can remove this line

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          token: ${{ secrets.GITHUB_TOKEN }} # If you are using a private repository

      - name: Get Daily LeetCode Problem
        uses: RndmCodeGuy20/Daily-LC-Problem-Action@v2.0.0 # Use the latest version - ✨ - if you are reading this care to checkout the marketplace for the latest version
        with:
          lang_choice: "Python3"
          # Strictly use one of these options : ["C++", "C", "Python3", "JavaScript", "Java"] - 🚀 names are case sensitive

      - name: Commit and push changes
        run: |
          git config --global user.name 'author name' # Replace with your name
          git config --global user.email 'author email' # Replace with your email
          git status
          git add .
          git commit -m "chore(action): today's daily leetcode question added"
          git push
  1. Run the workflow manually or wait for the scheduled time.

  2. The workflow will create a folder with the name of the problem and a file with the solution template.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors