-
Notifications
You must be signed in to change notification settings - Fork 25
46 lines (38 loc) · 1.09 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
name: Deploy PR preview
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
concurrency: preview-${{ github.ref }}
jobs:
deploy:
name: deploy PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Add url
run: |
echo "site_url: https://minbzk.github.io/Algoritmekader/pr-preview/pr-${{github.event.number}}" >> mkdocs.yml
- uses: actions/setup-python@v5
if: github.event.action != 'closed'
with:
python-version: 3.x
cache: 'pip'
- name: install dependencies
if: github.event.action != 'closed'
run: pip install -r requirements.txt
- name: build preview
if: github.event.action != 'closed'
run: mkdocs build
- uses: actions/upload-artifact@v4
if: github.event.action != 'closed'
with:
name: AlgoritmeKaderWebsite-${{github.event.number}}
path: ./site/
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./site/