-
-
Notifications
You must be signed in to change notification settings - Fork 30
56 lines (47 loc) · 1.39 KB
/
publish-docs-beta.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
name: Build and Deploy Docs Site (for beta)
on:
workflow_dispatch:
inputs:
version:
description: Document version e.g. 1.1-beta, 1.2-beta
required: true
delete:
description: Delete this Beta version
type: choice
required: true
default: 'false'
options:
- true
- false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- uses: actions/cache@v2
with:
key: ${{ github.ref }}
path: .cache
- uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.6.1
- name: Install dependencies
run: |
poetry config installer.max-workers 1
poetry config virtualenvs.in-project true
poetry install
- name: Configure Git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Publish site version (non-stable)
if: ${{ inputs.delete == 'false' }}
run: |
poetry run mike deploy --push --update-aliases ${{ inputs.version }}
- name: Delete site version
if: ${{ inputs.delete == 'true' }}
run: |
poetry run mike delete --push ${{ inputs.version }}