Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/pr-playground-preview-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: PR Playground Preview Publish

on:
workflow_run:
workflows:
- PR Playground Preview Build
types:
- completed

permissions:
actions: read
contents: write
pull-requests: write

jobs:
publish:
permissions:
actions: read
contents: write
pull-requests: write
uses: WordPress/action-wp-playground-pr-preview/.github/workflows/preview-publish.yml@v3
with:
blueprint: |
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"landingPage": "/wp-admin/options-general.php?page=two-factor-settings",
"steps": [
{
"step": "login",
"username": "admin",
"password": "password"
},
{
"step": "installPlugin",
"pluginZipFile": {
"resource": "url",
"url": "{{ARTIFACT_URL:two-factor}}"
},
"options": { "activate": true }
}
]
}
26 changes: 26 additions & 0 deletions .github/workflows/pr-playground-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: PR Playground Preview Build

on:
pull_request:
types: [opened, synchronize, reopened, edited]

permissions:
contents: read

jobs:
build:
permissions:
contents: read
uses: WordPress/action-wp-playground-pr-preview/.github/workflows/preview-build.yml@v3
with:
artifacts: two-factor=build/two-factor.zip
node-version: '20'
php-version: '8.3'
build-command: |
set -euo pipefail
npm ci
rm -rf build
npm run build
mkdir -p build/two-factor
rsync -a --delete dist/ build/two-factor/
( cd build && zip -qr two-factor.zip two-factor )
Loading