-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.83 KB
/
publish.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
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 using mkdocs.publish.yml
# https://www.mkdocs.org/user-guide/deploying-your-docs/
run: mkdocs gh-deploy -f mkdocs.publish.yml --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}}'