Sync Leetcode #426
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync Leetcode | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Sync | |
| uses: joshcai/leetcode-sync@v1.7 | |
| with: | |
| github-token: ${{ github.token }} | |
| leetcode-csrf-token: ${{ secrets.LEETCODE_CSRF_TOKEN }} | |
| leetcode-session: ${{ secrets.LEETCODE_SESSION }} | |
| verbose: true | |
| commit-header: "[LeetCode Sync]" | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| - name: Update README | |
| run: python .github/scripts/update_readme.py | |
| - name: Commit README update | |
| run: | | |
| github-token: ${{ github.token }} | |
| git add README.md | |
| git commit -m "[Auto] Update README with latest stats" | |
| git push | |
| continue-on-error: true |