-
Notifications
You must be signed in to change notification settings - Fork 8
31 lines (30 loc) · 1.07 KB
/
deploy_page.yml
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
name: Deploy to GitHub Pages
on:
push:
branches:
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
- name: Build project
run: |
composer install --no-dev --optimize-autoloader --no-scripts --ignore-platform-reqs
wget https://github.com/phpDocumentor/phpDocumentor/releases/latest/download/phpDocumentor.phar -O phpDocumentor.phar
chmod +x phpDocumentor.phar
./phpDocumentor.phar run -d ./src -t ./docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docs