forked from srehwald/eat-api
-
Notifications
You must be signed in to change notification settings - Fork 14
42 lines (40 loc) · 1.32 KB
/
publish.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
name: publish
on:
schedule:
- cron: '0 9,21 * * MON-FRI'
- cron: '0 21 * * 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
run: ./scripts/parse.sh
- 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'