Skip to content

Commit 4a59194

Browse files
committed
Create daily documentation deploy job
1 parent ebf1d4c commit 4a59194

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Deploy Documentation
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: pages
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v6
25+
with:
26+
ref: gh-pages
27+
28+
- name: Setup PHP
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: 8.4
32+
extensions: json
33+
tools: composer:v2
34+
coverage: none
35+
36+
- name: Install dependencies
37+
run: composer update --prefer-dist --no-interaction --no-suggest
38+
39+
- name: Run PHP generators
40+
run: composer run build
41+
42+
- name: Setup pnpm
43+
uses: pnpm/action-setup@v4
44+
45+
- name: Setup Node
46+
uses: actions/setup-node@v6
47+
with:
48+
node-version: 24
49+
cache: pnpm
50+
51+
- name: Setup Pages
52+
uses: actions/configure-pages@v4
53+
54+
- name: Install dependencies
55+
run: pnpm install
56+
57+
- name: Build with VitePress
58+
run: pnpm docs:build
59+
env:
60+
REPOSITORY: ${{ github.repository }}
61+
62+
- name: Upload artifact
63+
uses: actions/upload-pages-artifact@v3
64+
with:
65+
path: docs/.vitepress/dist
66+
67+
deploy:
68+
environment:
69+
name: github-pages
70+
url: ${{ steps.deployment.outputs.page_url }}
71+
needs: build
72+
runs-on: ubuntu-latest
73+
name: Deploy
74+
steps:
75+
- name: Deploy to GitHub Pages
76+
id: deployment
77+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)