Skip to content

Commit 24790b5

Browse files
committed
Add workflow for docs
1 parent 360c176 commit 24790b5

File tree

1 file changed

+13
-55
lines changed

1 file changed

+13
-55
lines changed
Lines changed: 13 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,19 @@
1+
# https://docs.github.com/en/actions
2+
13
name: "Documentation"
24

35
on: # yamllint disable-line rule:truthy
4-
push:
5-
branches:
6-
- "1.x"
7-
pull_request: null
6+
push:
7+
branches:
8+
- "2.x"
9+
workflow_dispatch: null
810

911
jobs:
10-
documentation:
11-
name: "Documentation"
12-
runs-on: "ubuntu-latest"
13-
steps:
14-
- name: "Checkout"
15-
uses: "actions/checkout@v6"
16-
17-
- name: "Build"
18-
uses: "phpDocumentor/phpDocumentor@master"
19-
20-
- name: "Deploy"
21-
if: "${{ github.event_name == 'push' && github.ref == 'refs/heads/1.x' }}"
22-
uses: "actions/upload-artifact@v6"
23-
with:
24-
name: "documentation"
25-
path: "build/docs"
26-
retention-days: 1
27-
28-
deploy:
29-
name: "Deploy"
30-
if: "${{ github.event_name == 'push' && github.ref == 'refs/heads/1.x' }}"
31-
runs-on: "ubuntu-latest"
32-
needs: "documentation"
33-
steps:
34-
- name: "Checkout"
35-
uses: "actions/checkout@v6"
36-
with:
37-
repository: "phpDocumentor/docs"
38-
token: "${{ secrets.BOT_TOKEN }}"
39-
path: "docs"
40-
41-
- name: "Download"
42-
uses: "actions/download-artifact@v7"
43-
with:
44-
name: "documentation"
45-
path: "build/docs"
46-
47-
- name: "Copy files"
48-
run: "rsync -r --delete build/docs/* docs/docs/components/type-resolver"
49-
50-
- name: "Commit"
51-
uses: "stefanzweifel/git-auto-commit-action@v7"
52-
with:
53-
repository: "docs"
54-
commit_message: "Update type-resolver documentation"
55-
56-
- name: "Push"
57-
uses: "ad-m/github-push-action@master"
12+
run:
13+
name: "Documentation"
14+
uses: "phpDocumentor/.github/.github/workflows/documentation.yml@main"
5815
with:
59-
directory: "docs"
60-
github_token: "${{ secrets.BOT_TOKEN }}"
61-
repository: "phpDocumentor/docs"
16+
deploy: true
17+
component: "reflection-docblock"
18+
secrets:
19+
token: "${{ secrets.BOT_TOKEN }}"

0 commit comments

Comments
 (0)