-
Notifications
You must be signed in to change notification settings - Fork 17
48 lines (37 loc) · 1.39 KB
/
docs.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
name: docs
# declare default permissions
permissions: read-all
on:
# enable manual run via GitHub UI
workflow_dispatch:
# enable triggering on docs file changes
# https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#using-filters-to-target-specific-paths-for-pull-request-or-push-events
push:
branches: ["main"]
paths: ["docs/**.md"]
workflow_run:
workflows: ["Version Release"]
types:
- completed
# Runs on on tags and does not get the secret
# release:
# types: [published]
jobs:
build:
runs-on: ubuntu-latest
# makes environment secrets available to job steps
environment: prod
steps:
- name: Get token to trigger defenseunicorns/pepr-docs workflow
id: get_workflow_trigger_token
uses: peter-murray/workflow-application-token-action@dc0413987a085fa17d19df9e47d4677cf81ffef3 # v3.0.0
with:
application_id: ${{ secrets.DOCS_WORKFLOW_GITHUB_APP_ID }}
application_private_key: ${{ secrets.DOCS_WORKFLOW_GITHUB_APP_SECRET }}
organization: defenseunicorns
- name: Trigger defenseunicorns/pepr-docs build & deploy workflow
env:
GH_TOKEN: ${{ steps.get_workflow_trigger_token.outputs.token }}
run: |
gh api https://api.github.com/repos/defenseunicorns/pepr-docs/dispatches \
--input - <<< '{"event_type":"update-docs"}'