Skip to content

Commit

Permalink
CI Rebuild workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
adamziel committed Jun 6, 2024
1 parent 7126f37 commit b6132f2
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/rebuild_phar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: PHP Preprocess and Commit

on:
push:
branches:
- main
- trunk
pull_request:
branches:
- main
- trunk

jobs:
php-preprocess:
runs-on: ubuntu-latest

steps:
- name: Setup SSH Keys
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.GH_DEPLOY_KEY }}

- name: Checkout repository
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1' # Change to the desired PHP version
coverage: none

- name: Run PHP preprocess
run: php -dphar.readonly=0 preprocess-wxr.php --bundle

- name: Push rebuilt WordPress to GitHub
run: |
git config --global user.name "deployment_bot"
git config --global user.email "[email protected]"
git add -A
git commit -a -m "Reindex and reformat Blueprints"
git pull --rebase
if [ $? -eq 0 ]; then
git push [email protected]:${{ github.repository }}.git --follow-tags
fi;
Binary file removed preprocess-wxr.phar
Binary file not shown.

0 comments on commit b6132f2

Please sign in to comment.