Update index.md #50
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: | |
branches: | |
- master | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: git clone | |
# see https://github.com/actions/checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
# see https://github.com/actions/setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- uses: actions/cache@v2 | |
# see https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#caching | |
with: | |
key: ${{ github.ref }} | |
path: .cache | |
- name: Install dependencies for the social plugin | |
# see https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#dependencies | |
run: | | |
sudo apt-get install -y libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev | |
pip install pillow cairosvg | |
- name: Install Python dependencies | |
run: | | |
pip install -r requirements.txt | |
- name: Build and deploy the branch gh-pages | |
# https://www.mkdocs.org/user-guide/deploying-your-docs/ | |
run: CARDS=true mkdocs gh-deploy --force | |
- name: Deploy on sibils.text-analytics.ch | |
# CURL options: | |
# -f : GitHub workflow fail if the HTTP status code is not 200 | |
# see API on https://candy.hesge.ch/ghupdate/ | |
# ${{ github.repository }} is replaced by the repository name, for example bitem-heg-geneve/bicikl-fair-data-place | |
run: | | |
curl -f -X 'POST' "https://infra.text-analytics.ch/api/webstatic/deploy/github.com/${{ github.repository }}/gh-pages" \ | |
-H 'accept: application/json' \ | |
-H 'Content-Type: application/x-www-form-urlencoded' \ | |
-d 'secret_key=${{secrets.SECRET_KEY}}' |