From 47e573c6d02b6cd4661233c3048c9f2db3f5571c Mon Sep 17 00:00:00 2001 From: Nemo Date: Thu, 12 Jan 2023 15:46:15 +0530 Subject: [PATCH] Add workflow --- .github/workflows/update.yml | 29 +++++++++++++++++++++++++++++ requirements.txt | 7 +++++++ 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/update.yml create mode 100644 requirements.txt diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml new file mode 100644 index 0000000..37f86b7 --- /dev/null +++ b/.github/workflows/update.yml @@ -0,0 +1,29 @@ +name: Update Data +on: + workflow_dispatch: + push: + schedule: + - cron: '7 18 * * *' +jobs: + update: + permissions: + contents: write + packages: write + name: Update data + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.head_ref }} + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - name: Update data + run: | + pip install -r requirements.txt + python update.py + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Update KB Data + commit_author: 'github-actions[bot] ' + file_pattern: "data.json" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..49a901b --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +beautifulsoup4==4.11.1 +html5lib==1.1 +pyaml==21.10.1 +PyYAML==6.0 +six==1.16.0 +soupsieve==2.3.2.post1 +webencodings==0.5.1