English #1650
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: English | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: '11 0 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Install custom pre-processor | |
run: | | |
cd tools/python/markdown-pp-master | |
python3 setup.py develop | |
pip install MarkdownPP | |
- name: Install markdown extensions | |
run: | | |
cd tools/python/markdown-extensions/d_card | |
python3 setup.py develop | |
pip install d_card | |
- name: Install dhis2_plugins for mkdocs | |
run: | | |
cd tools/python/dhis2_plugins | |
python3 setup.py develop | |
pip install dhis2_plugins | |
- name: Install markdown hacks | |
run: | | |
# temporary hacks | |
python3 -m site | |
cp tools/python/blockprocessors.py ${pythonLocation}/lib/python3.9/site-packages/markdown/ | |
cp tools/python/attr_list.py ${pythonLocation}/lib/python3.9/site-packages/markdown/extensions/ | |
cp tools/python/tables.py ${pythonLocation}/lib/python3.9/site-packages/markdown/extensions/ | |
- name: Install node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: install prettier | |
run: npm install -g prettier | |
- name: Build the docs | |
run: | | |
mkdocs build | |
env: | |
DHIS2_DOCS_TX_TOKEN: ${{ secrets.DHIS2_DOCS_TX_TOKEN }} | |
- name: Sync docs to S3 | |
uses: dhis2/s3-sync-action@master | |
with: | |
args: --delete --exclude 'full*' | |
env: | |
AWS_S3_BUCKET: ${{ secrets.DHIS2_S3_DOCS_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.DHIS2_S3_DOCS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.DHIS2_S3_DOCS_ACCESS_KEY }} | |
AWS_REGION: 'eu-west-1' | |
SOURCE_DIR: 'target/en/.' | |
DEST_DIR: 'en/' | |
AWS_CF_DISTRIBUTION_ID: ${{ secrets.DHIS2_S3_DOCS_CF_ID }} |