Skip to content

Run parser

Run parser #24

name: Generate Playground Assets
on:
push:
workflow_dispatch:
jobs:
generate-playground-assets:
runs-on: ubuntu-latest
steps:
- name: Checkout repo.
uses: actions/checkout@v4
- name: Clone wporg-parent-2021 parent theme sourcecode.
uses: actions/checkout@v4
with:
repository: 'WordPress/wporg-parent-2021'
path: 'wp-content/themes/wporg-parent-2021'
- name: Clone wporg-developer-2023 theme sourcecode.
uses: actions/checkout@v4
with:
repository: 'WordPress/wporg-developer'
path: 'wp-content/themes/wporg-developer-2023'
- name: Clone GatherPress sourcecode.
uses: actions/checkout@v4
with:
repository: 'GatherPress/gatherpress'
path: 'wp-content/plugins/gatherpress'
- name: Clone phpdoc-parser source.
uses: actions/checkout@v4
with:
repository: 'WordPress/phpdoc-parser'
path: 'wp-content/plugins/phpdoc-parser'
- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Configure Composer cache
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --ignore-platform-req=php+ --working-dir "${{ github.workspace }}/wp-content/plugins/phpdoc-parser"
- name: Copy built assets into ZIP for extraction inside Playground.
run: |
zip -FSr zips/playground-assets.zip wp-content -x "*.git*" "*.mp4*"
rm -rf wp-content
- uses: EndBug/add-and-commit@v9
with:
message: 'Persist prepared assets'