Skip to content

Commit 83e28c4

Browse files
author
nix
committed
added API documentation (GH Pages) workflow
1 parent a29925f commit 83e28c4

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/api-docs.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: API documentation
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
jobs:
13+
generate:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: 'Checkout'
17+
uses: actions/checkout@v4
18+
- name: 'Set up PHP (8.2)'
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: '8.2'
22+
- run: ./composer.phar install -n --no-progress -o
23+
- run: ./composer.phar api-docs
24+
- name: 'Upload as pages-artifact'
25+
uses: actions/upload-pages-artifact@v3
26+
with:
27+
path: 'api-docs'
28+
name: api-docs
29+
deploy:
30+
runs-on: ubuntu-latest
31+
needs: generate
32+
environment:
33+
name: github-pages
34+
url: ${{ steps.deployment.outputs.page_url }}
35+
steps:
36+
- name: 'Checkout (for repo metadata)'
37+
uses: actions/checkout@v4
38+
- name: 'Deploy to Pages'
39+
id: deployment
40+
uses: actions/deploy-pages@v4
41+
with:
42+
artifact_name: api-docs

0 commit comments

Comments
 (0)