-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (52 loc) · 1.84 KB
/
create_plots.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
52
53
54
55
56
57
name: Create plots
on:
schedule:
- cron: '0 4 * * *'
# on:
# push:
# branches:
# - main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Run image
uses: abatilo/actions-poetry@v2
with:
poetry-version: "1.4.2"
- name: Install poetry dependencies
run: poetry install
- name: Install nltk dependencies
run: |
poetry run python -m nltk.downloader punkt stopwords wordnet omw-1.4
- name: Prefect Cloud login
run: |
poetry run prefect config set PREFECT_API_KEY=${{secrets.PREFECT_API_KEY}}
poetry run prefect cloud workspace set --workspace "${{secrets.PREFECT_WORKSPACE}}"
- name: Run python script
run: |
poetry run python flows/create_plots.py
- name: Add & Commit
# if: always()
uses: EndBug/add-and-commit@v9.1.1
with:
# The arguments for the `git add` command (see the paragraph below for more info)
# Default: '.'
add: '.'
# The name of the user that will be displayed as the author of the commit.
# Default: depends on the default_author input
author_name: Arturo Martínez
# The email of the user that will be displayed as the author of the commit.
# Default: depends on the default_author input
author_email: ${{ secrets.EMAIL }}
# The message for the commit.
# Default: 'Commit from GitHub Actions (name of the workflow)'
message: 'create plots daily'
# Whether to push the commit and, if any, its tags to the repo. It can also be used to set the git push arguments (see the paragraph below for more info)
# Default: true
push: true