forked from srehwald/eat-api
-
Notifications
You must be signed in to change notification settings - Fork 14
47 lines (44 loc) · 1.51 KB
/
publish_en.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
name: publish_en
on:
schedule:
- cron: '00 22 * * SUN'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install -y tree poppler-utils
python -m pip install --upgrade pip
pip install poetry
poetry config virtualenvs.create false
poetry install --no-interaction --no-ansi
- name: Test with pytest
run: pytest
env:
PYTHONPATH: src/
if: github.event_name == 'push'
- name: Parse
env:
LANGUAGE_EAT_API: EN-US
DEEPL_API_KEY_EAT_API: ${{ secrets.DEEPL_API_KEY }}
run: ./scripts/parse.sh
- name: Copy to language named subfolder
run: mv dist en && mkdir dist && mv en dist
- name: Deploy
uses: docker://peaceiris/gh-pages:latest
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./dist
with:
emptyCommits: false
keepFiles: true
if: github.ref == 'refs/heads/master'