-
Notifications
You must be signed in to change notification settings - Fork 20
50 lines (48 loc) · 1.66 KB
/
deploy.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
name: "Deploy Documentation"
on:
push:
branches: [main]
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
force:
type: boolean
description: Force build (skip version check)
default: false
git_ref:
type: string
default: main
repository_dispatch:
types: [update_docs]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
push-on-main:
if: (github.event_name == 'push' && github.ref == 'refs/heads/main')
uses: platformatic/docs/.github/workflows/rebuild-and-deploy-docs.yml@main
with:
original_event: push_on_main
secrets:
GH_API_TOKEN: ${{ secrets.GH_API_TOKEN }}
TARGET_REPO: ${{ secrets.TARGET_REPO }}
repository-dispatch:
if: (github.event_name == 'repository_dispatch' && github.event.action == 'update_docs')
uses: platformatic/docs/.github/workflows/rebuild-and-deploy-docs.yml@main
with:
force: ${{ github.event.client_payload.force || false }}
git_ref: ${{ github.event.client_payload.git_ref }}
original_event: repository_dispatch
secrets:
GH_API_TOKEN: ${{ secrets.GH_API_TOKEN }}
TARGET_REPO: ${{ secrets.TARGET_REPO }}
workflow-dispatch:
if: (github.event_name == 'workflow_dispatch')
uses: platformatic/docs/.github/workflows/rebuild-and-deploy-docs.yml@main
with:
force: ${{ inputs.force || false }}
git_ref: ${{ inputs.git_ref }}
original_event: workflow_dispatch
secrets:
GH_API_TOKEN: ${{ secrets.GH_API_TOKEN }}
TARGET_REPO: ${{ secrets.TARGET_REPO }}