Update the documentation #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: continuous-integration | |
on: push | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch sources | |
uses: actions/checkout@v4 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
extensions: curl, intl, mbstring, simplexml | |
php-version: 8.3 | |
- name: Get cache directory | |
id: cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{steps.cache.outputs.dir}} | |
key: ${{runner.os}}-composer-${{hashFiles('**/composer.lock')}} | |
restore-keys: ${{runner.os}}-composer- | |
- name: Install dependencies | |
run: composer install | |
- name: Run tests | |
run: composer test | |
env: | |
AKISMET_API_KEY: ${{secrets.AKISMET_API_KEY}} | |
deploy: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch sources | |
uses: actions/checkout@v4 | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
extensions: curl, intl, mbstring, simplexml | |
php-version: 8.3 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
cache: pip | |
python-version: 3.12 | |
- name: Install dependencies | |
run: | | |
curl --location --output var/castor.phar https://github.com/jolicode/castor/releases/latest/download/castor.linux-amd64.phar | |
pip install --requirement=etc/requirements.txt | |
- name: Deploy documentation | |
run: | | |
php var/castor.phar doc | |
mkdocs gh-deploy --config-file=etc/mkdocs.yaml --force |