forked from superagent-ai/grok-cli
-
-
Notifications
You must be signed in to change notification settings - Fork 1
102 lines (85 loc) · 2.42 KB
/
pages.yml
File metadata and controls
102 lines (85 loc) · 2.42 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
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
102
name: Deploy Documentation to GitHub Pages
on:
push:
branches: [main]
paths:
- "docs/**"
- ".github/workflows/pages.yml"
- "README.md"
- "CHANGELOG.md"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
generate-changelog:
name: Generate Changelog
runs-on: ubuntu-latest
outputs:
changelog: ${{ steps.changelog.outputs.changelog }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Install conventional-changelog-cli
run: bun install -g conventional-changelog-cli
- name: Generate changelog
id: changelog
run: |
# generate changelog text into a file and set step output
changelog=$(conventional-changelog -p angular -i CHANGELOG.md -s -r 0 --context "")
echo "$changelog" > "$GITHUB_WORKSPACE/changelog.md"
echo "changelog<<EOF" >> $GITHUB_OUTPUT
echo "$changelog" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Upload changelog artifact
uses: actions/upload-artifact@v4
with:
name: changelog
path: |
changelog.md
retention-days: 1
deploy:
name: Deploy to GitHub Pages
needs: generate-changelog
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Download changelog artifact
uses: actions/download-artifact@v7
with:
name: changelog
path: docs/
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: bun install
- name: Build documentation
run: bun run build
- name: Setup Pages
uses: actions/configure-pages@v4
with:
static_site_generator: none
- name: Upload artifact
uses: actions/upload-pages-artifact@v4
with:
path: docs/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4