add words #1930
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
# schedule: | |
# - cron: '9 * * * *' | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Test code | |
steps: | |
- name: Checkout ladino-diksionaryo-code | |
uses: actions/checkout@v3 | |
with: | |
repository: 'kantoniko/ladino-diksionaryo-code' | |
path: . | |
- name: Checkout ladino-diksionaryo-data | |
uses: actions/checkout@v3 | |
with: | |
repository: 'kantoniko/ladino-diksionaryo-data' | |
path: ladino-diksionaryo-data | |
- name: Install dependencies | |
run: | | |
python -V | |
pip install -r requirements.txt | |
- name: Run tests | |
run: | | |
pytest -sv --random-order tests/ | |
- name: Run check | |
env: | |
PYTHONPATH: . | |
run: python ladino/generate.py --dictionary ladino-diksionaryo-data | |
generate: | |
if: ${{ github.ref == 'refs/heads/main' && github.event_name != 'pull_request' }} | |
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 | |