-
Notifications
You must be signed in to change notification settings - Fork 638
48 lines (42 loc) · 1.63 KB
/
Copy pathdeploy-docs.yml
File metadata and controls
48 lines (42 loc) · 1.63 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
# Generated by the rollout-deploy-docs-trigger workflow in
# spring-cloud/spring-cloud-github-actions.
#
# Do not edit this file directly - update examples/deploy-docs-trigger.yml
# there and re-run the rollout, otherwise your change will be overwritten.
name: Deploy Docs
on:
push:
# Allow-list of exactly this branch. A topic or Dependabot branch cut from
# it carries this file too, and without this filter every push to one of
# those would dispatch a full docs build for a ref that is not in the
# Antora playbook.
branches:
- main
tags: '**'
repository_dispatch:
types: request-build-reference # legacy
workflow_dispatch:
permissions:
contents: read # required to check out private commercial repositories
actions: write # required to dispatch the docs build
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: docs-build
fetch-depth: 1
# A branch push rebuilds just that branch's docs; a tag push rebuilds
# everything so the new version appears in the version dropdown.
- name: Dispatch (partial build)
if: github.ref_type == 'branch'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD) -f build-refname=${{ github.ref_name }}
- name: Dispatch (full build)
if: github.ref_type == 'tag'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh workflow run deploy-docs.yml -r $(git rev-parse --abbrev-ref HEAD)