Skip to content

Commit 947ec79

Browse files
committed
Test new publishing workflow
1 parent 7ba7bf5 commit 947ec79

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
on:
2+
repository_dispatch:
3+
types:
4+
- publish_spec
5+
workflow_dispatch:
6+
inputs:
7+
ref:
8+
description: Branch or tag to publish (e.g. refs/heads/development/v2).
9+
required: true
10+
default: refs/heads/master
11+
aliases:
12+
description: Space-delimited aliases to publish (e.g. latest v2-latest).
13+
required: false
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
container: python:3
18+
steps:
19+
- uses: actions/checkout@v3
20+
with:
21+
ref: ${{ github.event.client_payload.ref || github.event.inputs.ref }}
22+
fetch-depth: 0 # Because we will be pushing the gh-pages branch
23+
token: ${{ secrets.ACTIONS_DEPLOY_KEY }}
24+
- name: Install pre-requisites
25+
run: pip install -r requirements.txt
26+
- name: Install mike
27+
run: pip install mike==1.2.0
28+
- name: Extract branch or tag name
29+
id: extract-branch-or-tag-name
30+
run: echo "::set-output name=${REF##*/}"
31+
with:
32+
ref: ${{ github.event.client_payload.ref || github.event.inputs.ref }}
33+
- name: Build docs
34+
run: mike deploy ${{ steps.outputs.extract-branch-or-tag-name.name }} ${{ github.event.inputs.aliases }}

0 commit comments

Comments
 (0)