-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.42 KB
/
upload_to_ankiweb.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Upload to AnkiWeb
on:
workflow_dispatch:
workflow_call:
secrets:
GOOGLE_API_KEY:
required: true
ANKIWEB_USERNAME:
required: true
ANKIWEB_PASSWORD:
required: true
jobs:
upload-to-ankiweb:
name: Upload to AnkiWeb
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install deps
run: |
python -m pip install -r ./requirements/base.txt
- name: Create ankiaddon file
run: |
bash ./scripts/release.sh
env:
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
- name: Install dependencies
run: |
python -m pip install git+https://github.com/nateshmbhat/webbot.git@333f51840cd5a1fcde0b014bd6ab401d51e62860
python -m pip install webdriver_manager==4.0.2
python -m pip uninstall -y selenium
python -m pip install selenium==3.141.0
python -m pip uninstall -y urllib3
python -m pip install urllib3==1.26.14
- name: Run upload script
run: |
python scripts/upload_to_ankiweb.py ankihub.ankiaddon ankiweb_description.html https://ankihub.net/support
env:
ANKI_USERNAME: ${{ secrets.ANKIWEB_USERNAME }}
ANKI_PASSWORD: ${{ secrets.ANKIWEB_PASSWORD }}