Update existing content #35
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: Update existing content | |
on: | |
workflow_dispatch: | |
push: | |
branches: [trunk] | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
content-update: | |
if: github.repository_owner == 'WordPress' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
with: | |
ref: trunk | |
- name: Setup | |
uses: WordPress/wporg-repo-tools/.github/actions/setup@trunk | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run the content update | |
run: | | |
chmod -R ugo+w source/wp-content/themes/wporg-main-2022/ | |
yarn wp-env start | |
yarn build:patterns | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
branch: automated/content-update | |
delete-branch: true | |
add-paths: source/wp-content/themes/wporg-main-2022/**/*.php | |
title: 'Content updates from Page Editor' | |
commit-message: '[automated] Sync content from Page Editor.' | |
body: | | |
The content has changed in the Page Editor. | |
Please review, merge, and deploy. |