Skip to content

JacobLinCool/LeetCode-Solutions-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode Solutions Template

Template for leetcode-dump with GitHub Actions, build solution repository and website in minutes.

Usage

Quick Start

  1. Fork, or use this repository as template.
  2. Add LEETCODE_SESSION to GitHub Action Secret.
  3. Run Dump workflow and wait for completion.
  4. Enable GitHub Pages from settings.

LEETCODE_SESSION can be found in cookies of https://leetcode.com.

  • The dumped solutions will be in main branch.
  • The built website will be in gh-pages branch.

Custom Domain

Go to .github/workflows/dump.yml.

Uncomment env.CNAME and set it to your custom domain in step Build Static Site.

Rerun the workflow and wait for completion.

Deploy to Other Repository / Branch

It may be useful to deploy the solution repository to other repository or branch if you want to keep the source private.

See peaceiris/actions-gh-pages > Deploy to external repository.

Pin leetcode-dump Version

The default behavior is to use the latest version of leetcode-dump.

If you want to use a specific version of leetcode-dump, you can pin it in .github/workflows/dump.yml.

# Example: pin to version 0.4.12
npm i -g leetcode-dump@0.4.12

It will be useful if you want to prevent suffering from unintentional bugs made by the author.

Since vuepress 2 is still in beta, I don't know when can this tool reach stable (1.0.0).

Use Docker Image instead of npm

GitHub Actions supports Docker, so if you want to use Docker instead of npm, you can use docker run to do the same thing.

See Docker Usage.

About

Template for leetcode-dump with GitHub Action, build solution repository and website.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published