-
Notifications
You must be signed in to change notification settings - Fork 805
40 lines (34 loc) · 1.03 KB
/
preview.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
name: 🔂 Crane PR Docs Preview
on:
pull_request_target:
# when using teardown: 'true', add default event types + closed event type
types: [opened, synchronize, reopened, closed]
paths:
- 'docs/**'
- '**.md'
- 'mkdocs.yml'
jobs:
preview:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- run: pip install mkdocs-material mkdocs-static-i18n mike mkdocs-same-dir
- run: git log --oneline --decorate --max-count=10 && ls -la
- uses: afc163/surge-preview@v1
with:
surge_token: ${{ secrets.SURGE_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
dist: site
teardown: 'true'
build: |
mkdocs build