-
Notifications
You must be signed in to change notification settings - Fork 12
44 lines (39 loc) · 967 Bytes
/
deploy.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
name: Build and deploy
on:
push:
branches: [ mkdocs ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
path: mkdocs
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Setup Git & Install dependencies
run: |
git config --global user.email "e.urunuela@bcbl.eu"
git config --global user.name "eurunuela"
python -m pip install --upgrade pip
pip install -r mkdocs/requirements.txt
- uses: actions/checkout@v2
with:
ref: master
path: www
- name: Clean up master
run: |
cd www/
git ls-files -z | xargs -0 git rm -f
- name: Build
run: |
cd mkdocs/
mkdocs build -d ../www/
- name: Deploy
run: |
cd www/
echo -e "a\n*\nq\n"|git add -i
git commit -am "auto: deploy new website"
git push