-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removed redundant JSONs and Pickles due to shift to using submodule p…
…ickles and dataclass
- Loading branch information
Showing
4 changed files
with
54 additions
and
55 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,66 @@ | ||
name: '[Updating LeetCode question data]' | ||
# name: '[Updating LeetCode question data]' | ||
|
||
on: | ||
schedule: | ||
- cron: "15 5 * * 0" # runs at 5:15 am UTC on SUNDAYS | ||
# matches my 'leetcode question-data' | ||
# repo's schedule with a slight delay to allow | ||
# for the request to occur | ||
# | ||
# Chose this due to contests being on Saturday | ||
# at 2:30 am UTC | ||
# on: | ||
# schedule: | ||
# - cron: "15 5 * * 0" # runs at 5:15 am UTC on SUNDAYS | ||
# # matches my 'leetcode question-data' | ||
# # repo's schedule with a slight delay to allow | ||
# # for the request to occur | ||
# # | ||
# # Chose this due to contests being on Saturday | ||
# # at 2:30 am UTC | ||
|
||
workflow_dispatch: | ||
# workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
# permissions: | ||
# contents: write | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the current repository content | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: "true" | ||
token: ${{ secrets.PAT }} | ||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout the current repository content | ||
# uses: actions/checkout@v2 | ||
# with: | ||
# submodules: "true" | ||
# token: ${{ secrets.PAT }} | ||
|
||
- name: Pull updated question data submodule | Adding it as a submodule if not present | ||
run: | | ||
if [ -d question_data/question_data/ ]; then | ||
echo "Submodule exists." | ||
git submodule update --recursive --remote | ||
else | ||
echo "Submodule not found. Adding..." | ||
git submodule add https://github.com/Zanger67/leetcode-question-data.git 'question_data/question_data' | ||
git submodule update --init --recursive | ||
fi | ||
# - name: Pull updated question data submodule | Adding it as a submodule if not present | ||
# run: | | ||
# if [ -d question_data/question_data/ ]; then | ||
# echo "Submodule exists." | ||
# git submodule update --recursive --remote | ||
# else | ||
# echo "Submodule not found. Adding..." | ||
# git submodule add https://github.com/Zanger67/leetcode-question-data.git 'question_data/question_data' | ||
# git submodule update --init --recursive | ||
# fi | ||
|
||
- name: Copy the new JSON file | ||
run: | | ||
cp 'question_data/question_data/data/leetcode_oneline.json' 'question_data/leetcode_data.json' | ||
# - name: Copy the new JSON file | ||
# run: | | ||
# cp 'question_data/question_data/data/leetcode_oneline.json' 'question_data/leetcode_data.json' | ||
|
||
- name: Setup python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: "pip" | ||
# - name: Setup python 3.10 | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: "3.10" | ||
# cache: "pip" | ||
|
||
- name: Install python packages | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r 'requirements.txt' | ||
# - name: Install python packages | ||
# run: | | ||
# python -m pip install --upgrade pip | ||
# pip install -r 'requirements.txt' | ||
|
||
|
||
- name: Parse newly imported data | ||
run: | | ||
python parse_official_question_data.py | ||
# - name: Parse newly imported data | ||
# run: | | ||
# python parse_official_question_data.py | ||
|
||
- name: Commit and push the updated JSON file | ||
run: | | ||
git config --global user.name "Zanger67/wikileet" | ||
git config --global user.email "Zanger67[bot]@Zanger67.github.io" | ||
git add . | ||
git commit -m '[Weekly question data pickle update]' || exit 0 | ||
git push | ||
# - name: Commit and push the updated JSON file | ||
# run: | | ||
# git config --global user.name "Zanger67/wikileet" | ||
# git config --global user.email "Zanger67[bot]@Zanger67.github.io" | ||
# git add . | ||
# git commit -m '[Weekly question data pickle update]' || exit 0 | ||
# git push |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.