-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.26 KB
/
ci.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
name: CI
on:
push:
# schedule:
# - cron: '9 * * * *'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
name: Test code
steps:
- name: Checkout this repo
uses: actions/checkout@v3
with:
path: ladino-estamos-whatsapeando
- name: Checkout the ladino-diksionaryo-code
uses: actions/checkout@v3
with:
repository: 'kantoniko/ladino-diksionaryo-code'
path: ladino-diksionaryo-code
- name: Install dependencies
run: |
pip install -r ladino-diksionaryo-code/requirements.txt
- name: Run tests
run: |
cd ladino-estamos-whatsapeando
./check.sh
generate:
runs-on: ubuntu-latest
name: Generate HTML
needs: [test]
steps:
- name: Generate HTML
env:
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: |
curl -X POST \
-H "Authorization: token $PERSONAL_ACCESS_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/repos/kantoniko/kantoniko.github.io/actions/workflows/ci.yml/dispatches \
-d '{"ref":"main"}' | tee out.txt
if [ -s out.txt ]
then
exit 1
else
exit 0
fi