-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (48 loc) · 1.54 KB
/
deploy.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Deploy
on:
push:
branches:
- master
pull_request:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
### MkDocs
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install Python Dependencies
run: pip install mkdocs-material autolink-references-mkdocs-plugin
- name: Build documentation
run: mkdocs build --site-dir public
### PHPUnit
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
extensions: dom, xml
coverage: xdebug
- name: Create directory public/coverage
run: mkdir ./public/coverage
- name: Install PHP Dependencies
run: composer install --ansi --prefer-dist --no-interaction --no-progress
- name: Build Coverage Report
run: XDEBUG_MODE=coverage ./vendor/bin/phpunit -c ./ --coverage-text --coverage-html ./public/coverage
### PHPDoc
- name: Create directory public/docs
run: mkdir ./public/docs
- name: Install PhpDocumentor
run: wget https://phpdoc.org/phpDocumentor.phar && chmod +x phpDocumentor.phar
- name: Build Documentation
run: ./phpDocumentor.phar run -d ./src -t ./public/docs
### Deploy
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public