Skip to content
This repository was archived by the owner on Dec 18, 2025. It is now read-only.

Merge pull request #24 from creode/feature/ci #10

Merge pull request #24 from creode/feature/ci

Merge pull request #24 from creode/feature/ci #10

Workflow file for this run

name: "Documentation"
on: # yamllint disable-line rule:truthy
push:
branches:
- "main"
pull_request: null
jobs:
build:
name: "Build Documentation"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Build"
uses: "phpDocumentor/phpDocumentor@master"
with:
target: "build/docs"
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3.0.1
if: "${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}"
with:
path: "build/docs"
retention-days: 1
deploy:
name: "Deploy"
if: "${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}"
runs-on: "ubuntu-latest"
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
contents: write # to commit the updated documentation to the repository
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: ["build"]
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
with:
path: "docs"
token: "${{ secrets.GITHUB_TOKEN }}"
- name: "Download docs"
uses: "actions/download-artifact@v4"
with:
name: "documentation"
path: "build/docs"
- name: "Copy files"
run: "rsync -r --delete build/docs/ docs/docs/"
- name: "Commit"
uses: "stefanzweifel/git-auto-commit-action@v5"
with:
repository: "docs"
commit_message: "Update main documentation"
- name: "Push"
uses: "ad-m/github-push-action@master"
with:
directory: "docs"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action