Skip to content

Commit 45ac2a1

Browse files
authored
Merge pull request #14 from kellnr/ci/auto-update-website
Ci/auto update website
2 parents b4cc6e2 + 00ee111 commit 45ac2a1

10 files changed

Lines changed: 3628 additions & 863 deletions

File tree

.github/scripts/apply_release_notes_to_changelog.py

Lines changed: 433 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Changelog Dispatch PR
2+
3+
on:
4+
repository_dispatch:
5+
types:
6+
- kellnr_release_notes
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
concurrency:
13+
group: changelog-dispatch-pr
14+
cancel-in-progress: false
15+
16+
jobs:
17+
create-changelog-pr:
18+
name: Create PR for changelog.json update
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Update changelog.json from dispatch payload
28+
shell: bash
29+
run: |
30+
set -euo pipefail
31+
32+
python3 .github/scripts/apply_release_notes_to_changelog.py \
33+
--payload-stdin \
34+
--changelog-json src/data/changelog.json <<'PAYLOAD'
35+
${{ toJson(github.event.client_payload) }}
36+
PAYLOAD
37+
38+
- name: Generate PR body summary
39+
id: pr_body
40+
shell: bash
41+
run: |
42+
set -euo pipefail
43+
44+
python3 .github/scripts/apply_release_notes_to_changelog.py \
45+
--payload-stdin \
46+
--print-summary \
47+
--dry-run \
48+
--changelog-json src/data/changelog.json <<'PAYLOAD' > pr_body.md
49+
${{ toJson(github.event.client_payload) }}
50+
PAYLOAD
51+
52+
echo "path=pr_body.md" >> "$GITHUB_OUTPUT"
53+
54+
- name: Create pull request
55+
id: cpr
56+
uses: peter-evans/create-pull-request@v7
57+
with:
58+
token: ${{ secrets.GITHUB_TOKEN }}
59+
commit-message: "chore(changelog): add release ${{ github.event.client_payload.version }}"
60+
branch: "automation/changelog-${{ github.event.client_payload.version }}"
61+
delete-branch: true
62+
title: "Changelog: release ${{ github.event.client_payload.version }}"
63+
body-path: ${{ steps.pr_body.outputs.path }}
64+
65+
- name: Summary
66+
if: always()
67+
shell: bash
68+
run: |
69+
echo "PR URL: ${{ steps.cpr.outputs.pull-request-url }}"
70+
echo "PR number: ${{ steps.cpr.outputs.pull-request-number }}"

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"build": "run-p build-only",
77
"preview": "vite preview",
88
"test:unit": "vitest",
9-
"build-only": "vite build",
9+
"generate:rss": "node scripts/generate-rss.mjs",
10+
"build-only": "npm run generate:rss && vite build",
1011
"type-check": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
1112
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore"
1213
},

0 commit comments

Comments
 (0)