Add files before commit #5
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: "Documentation" | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: | |
- "1.x" | |
pull_request: null | |
jobs: | |
documentation: | |
name: "Documentation" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
- name: "Build" | |
uses: "phpDocumentor/phpDocumentor@master" | |
- name: "Deploy" | |
if: "${{ github.event_name == 'push' && github.ref == 'refs/heads/1.x' }}" | |
uses: "actions/upload-artifact@v4" | |
with: | |
name: "documentation" | |
path: "build/docs" | |
retention-days: 1 | |
deploy: | |
name: "Deploy" | |
if: "${{ github.event_name == 'push' && github.ref == 'refs/heads/1.x' }}" | |
runs-on: "ubuntu-latest" | |
needs: "documentation" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
with: | |
repository: "phpDocumentor/docs" | |
token: "${{ secrets.BOT_TOKEN }}" | |
path: "docs" | |
- name: "Download" | |
uses: "actions/download-artifact@v4" | |
with: | |
name: "documentation" | |
path: "build/docs" | |
- name: "Copy files" | |
run: "cp -r build/docs docs/type-resolver" | |
- name: "Commit" | |
run: | | |
cd docs | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git add . | |
git commit -a -m "Update type-resolver documentation" | |
- name: "Push" | |
uses: "ad-m/github-push-action@master" | |
with: | |
directory: "docs" | |
token: "${{ secrets.BOT_TOKEN }}" | |
repository: "phpDocumentor/docs" |