-
Notifications
You must be signed in to change notification settings - Fork 6
59 lines (47 loc) · 1.32 KB
/
cd-stage.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
48
49
50
51
52
53
54
55
56
57
58
59
name: cd-stage
on:
workflow_dispatch:
push:
branches:
- 'dependabot/**'
env:
PUBLISH_BRANCH: pycourse-page-stage
jobs:
deploy:
runs-on: ubuntu-latest
timeout-minutes: 4
permissions:
contents: write
environment:
name: pycourse-page-stage
url: https://pycourse-page-stage.netlify.app/
steps:
- name: checkout code
uses: actions/checkout@v4
- name: setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: caching
uses: actions/cache@v4
with:
key: ${{ github.ref }}
path: .cache
- name: install deps
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: image processing deps
run: |
sudo pip install pillow cairosvg
sudo apt-get install libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
sudo apt-get install pngquant
- name: deploy mkdocs
run: mkdocs build -v
- name: update publish dir to build branch
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: ${{ env.PUBLISH_BRANCH }}
publish_dir: ./site