-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (49 loc) · 1.36 KB
/
Copy pathdocs.yml
File metadata and controls
60 lines (49 loc) · 1.36 KB
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
name: Deploy Docs to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
inputs:
ref:
description: "Branch or ref to build and deploy"
required: false
default: "main"
type: string
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref || github.ref }}
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install -e .
pip install -e xlm-models/
pip install -r requirements/docs_requirements.txt
- name: Build docs (verify)
run: mkdocs build
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Fetch gh-pages
run: git fetch origin gh-pages --depth=1 || true
- name: Deploy docs to gh-pages
run: mike deploy dev --push
- name: Set default version (when no releases exist)
run: |
if ! mike list latest 2>/dev/null; then
mike set-default dev --push
fi