forked from withastro/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (92 loc) · 3.28 KB
/
nightly.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Nightly
on:
schedule:
- cron: '0 12 * * *'
workflow_dispatch:
jobs:
docgen:
name: Generate Reference Docs
if: github.repository_owner == 'withastro'
runs-on: ubuntu-latest
strategy:
matrix:
include:
# Default options for running with latest Astro code
- SOURCE_BRANCH: main
TARGET_BRANCH: main
LABEL: ci
PR_BRANCH: ci/docgen
PR_TITLE: 'ci: update reference docs'
# Custom options for running with Astro v5 beta code
- SOURCE_BRANCH: next
TARGET_BRANCH: 5.0.0-beta
LABEL: 5.0.0-beta,ci
PR_BRANCH: ci/docgen-beta
PR_TITLE: '[BETA] ci: update reference docs'
steps:
- name: Check out code using Git
uses: actions/checkout@v4
with:
ref: ${{ matrix.TARGET_BRANCH }}
- name: Install Tools & Dependencies
uses: ./.github/actions/install
- name: Run docgen script
run: pnpm run docgen
env:
SOURCE_BRANCH: ${{ matrix.SOURCE_BRANCH }}
- name: Create Pull Request
id: createpr
uses: peter-evans/create-pull-request@v3
with:
branch: ${{ matrix.PR_BRANCH }}
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
add-paths: src/content/docs/en/reference/*.mdx
commit-message: 'ci: update reference docs'
title: ${{ matrix.PR_TITLE }}
body: |
This PR is auto-generated by a nightly GitHub action to update the reference docs from source code in withastro/astro.
labels: ${{ matrix.LABEL }}
base: ${{ matrix.TARGET_BRANCH }}
error:
name: Generate Error Reference Docs
if: github.repository_owner == 'withastro'
runs-on: ubuntu-latest
strategy:
matrix:
include:
# Default options for running with latest Astro code
- SOURCE_BRANCH: main
TARGET_BRANCH: main
LABEL: ci
PR_BRANCH: ci/docgen-errors
PR_TITLE: 'ci: update error reference docs'
# Custom options for running with Astro v5 beta code
- SOURCE_BRANCH: next
TARGET_BRANCH: 5.0.0-beta
LABEL: 5.0.0-beta,ci
PR_BRANCH: ci/docgen-errors-beta
PR_TITLE: '[BETA] ci: update error reference docs'
steps:
- name: Check out code using Git
uses: actions/checkout@v4
with:
ref: ${{ matrix.TARGET_BRANCH }}
- name: Install Tools & Dependencies
uses: ./.github/actions/install
- name: Run docgen script
run: pnpm run docgen:errors
env:
SOURCE_BRANCH: ${{ matrix.SOURCE_BRANCH }}
- name: Create Pull Request
id: createpr
uses: peter-evans/create-pull-request@v3
with:
branch: ${{ matrix.PR_BRANCH }}
token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
add-paths: src/content/docs/en/reference/*.mdx
commit-message: 'ci: update error reference docs'
title: ${{ matrix.PR_TITLE }}
body: |
This PR is auto-generated by a nightly GitHub action to update the error reference docs from source code in withastro/astro.
labels: ${{ matrix.LABEL }}
base: ${{ matrix.TARGET_BRANCH }}