-
Notifications
You must be signed in to change notification settings - Fork 149
45 lines (42 loc) · 1.55 KB
/
update-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
name: 'Update docs'
on:
repository_dispatch:
types: [doc_changes]
workflow_dispatch:
inputs:
branch:
type: string
description: The branch of the commit, usually something like `15-x-y`
required: true
sha:
type: string
description: The SHA of the `electron/electron` commit
required: true
permissions: {}
jobs:
update-docs:
runs-on: ubuntu-latest
environment: docs-updater
steps:
- name: Generate GitHub App token
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
id: generate-token
with:
creds: ${{ secrets.DOCS_UPDATER_GH_APP_CREDS }}
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # tag: v4.1.7
with:
token: ${{ steps.generate-token.outputs.token }}
- uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # tag: v4.0.3
with:
node-version: 20
- name: Install dependencies
uses: bahmutov/npm-install@e5c7e14408aa6089501de32bd16123b41738047e # tag: v1.10.2
- name: Prebuild
run: |
yarn pre-build ${{ github.event.client_payload.sha || github.event.inputs.sha }} ${{ github.event.client_payload.branch || github.event.inputs.branch }}
git add .
- name: Push changes
uses: dsanders11/github-app-commit-action@43de6da2f4d927e997c0784c7a0b61bd19ad6aac # v1.5.0
with:
message: 'chore: update ref to docs (🤖)'
token: ${{ steps.generate-token.outputs.token }}