Template for leetcode-dump with GitHub Actions, build solution repository and website in minutes.
- Fork, or use this repository as template.
- Add
LEETCODE_SESSION
to GitHub Action Secret. - Run Dump workflow and wait for completion.
- Enable GitHub Pages from settings.
LEETCODE_SESSION
can be found in cookies ofhttps://leetcode.com
.
- The dumped solutions will be in
main
branch.- The built website will be in
gh-pages
branch.
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.
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.
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).
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.