-
Notifications
You must be signed in to change notification settings - Fork 57
61 lines (49 loc) · 1.55 KB
/
preview.yaml
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
60
61
name: Preview docs.sekoia.io
on:
pull_request:
jobs:
build:
name: Preview docs.sekoia.io
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
id: setup-python
with:
python-version: '3.11'
- name: Make destination directory for compiled CSS
run: mkdir -vp docs/stylesheets/
- name: Compile CSS from SCSS files
uses: gha-utilities/[email protected]
with:
source: src/sekoiaio.scss
destination: docs/stylesheets/sekoiaio.css
- name: Install Poetry
run: |
pip install poetry
poetry config virtualenvs.in-project true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/[email protected]
with:
path: .venv
key: poetry-${{ runner.os }}-python${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}
restore-keys: |
poetry-${{ runner.os }}-python${{ steps.setup-python.outputs.python-version }}
- name: Install dependencies
run: |
poetry install
- name: Build site
run: |
poetry run python -m mkdocs build --strict
- name: Save PR number
run: |
echo ${{ github.event.number }} > ./site/.pr_number
- run: |
tar zcvf site.tar.gz -C site .
- uses: actions/upload-artifact@v3
with:
name: site.tar.gz
path: site.tar.gz