-
Notifications
You must be signed in to change notification settings - Fork 3.5k
67 lines (59 loc) · 1.84 KB
/
yarn-docs.yml
File metadata and controls
67 lines (59 loc) · 1.84 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: "Yarn docs"
on:
workflow_call:
inputs:
ref:
type: string
required: true
workflow_dispatch:
inputs:
ref:
description: "Ref"
type: string
required: true
push:
branches:
- develop
paths:
- "web/**"
- ".github/workflows/yarn-docs.yml"
env:
NODE: "22"
FRONTEND_MONOREPO_DIR: "web"
jobs:
build:
name: "Yarn docs"
if: "${{ github.event.commit.message != 'docs: Update tag docs and autocomplete dictionary' }}"
runs-on: ubuntu-latest
steps:
- uses: hmarr/debug-action@v3.0.0
- name: Configure git
shell: bash
run: |
set -xeuo pipefail
git config --global user.name 'robot-ci-heartex'
git config --global user.email 'robot-ci-heartex@users.noreply.github.com'
- name: Checkout
uses: actions/checkout@v6
with:
token: ${{ secrets.GIT_PAT }}
ref: ${{ inputs.ref || github.ref_name }}
- name: Setup frontend environment
uses: ./.github/actions/setup-frontend-environment
with:
node-version: "${{ env.NODE }}"
directory: "${{ env.FRONTEND_MONOREPO_DIR }}"
- name: "Generate docs tags files"
if: inputs.generate_doc_tags_files
working-directory: "${{ env.FRONTEND_MONOREPO_DIR }}"
run: yarn docs
- name: "Commit and Push"
env:
COMMIT_MESSAGE: "docs: Update tag docs and autocomplete dictionary"
WORKFLOW_LINK: "Workflow run: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
run: |
git add "${{ env.FRONTEND_MONOREPO_DIR }}" || true
git add "${{ env.DOCS_TARGET_DIR }}" || true
git status -s
git commit -m "${COMMIT_MESSAGE}" -m "${WORKFLOW_LINK}" || true
git push origin HEAD