Skip to content

Build Docs

Build Docs #1

Workflow file for this run

name: PHP Composer
on:
workflow_dispatch:
env:
AUTODOCS_OUTPUT: "${{ github.workspace }}"
AUTODOCS_CACHE: "${{ github.workspace }}/autodocs-demo/storage/cache"
AUTODOCS_TEMPLATES: "${{ github.workspace }}/autodocs-demo/storage/templates"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
# Install Dependencies
- name: Install dependencies
run: composer install --prefer-dist --no-progress
# Build Docs
- name: Run Autodocs
run: ./autodocs build
# Copy updated docs to main repo
- name: "Copy updates to main repo"
run: |
echo "Copying files..." && \
cp -R "${{ env.AUTODOCS_OUTPUT }}" "${{ github.workspace }}/autodocs-demo/storage/content" && \
echo "Finished copy"
############################################################################################
# Send a Pull Request
############################################################################################
- name: Create a PR
uses: peter-evans/create-pull-request@2b011faafdcbc9ceb11414d64d0573f37c774b04 # v4.2.3
id: cpr
with:
path: "${{ github.workspace }}/autodocs-demo"
commit-message: Update content
title: "[AutoDocs] Updated Docs"
body: "Updated Docs"
labels: |
documentation
automated
assignees: erikaheidi