ci: improve theme-preview actiot push (#2065)

This commit makes sure that:
 - The theme-preview action can test multiple themes.
 - Fails if something goes wrong.
 - Requests changes if the theme does not adhere to the guidelines.
 - Approves the PR if the theme adheres to the guidelines.
This commit is contained in:
Rick Staa
2022-10-01 14:01:29 +02:00
committed by GitHub
parent f8e32f9e0c
commit 6b7e91abb6
2 changed files with 515 additions and 114 deletions
+7 -7
View File
@@ -2,25 +2,25 @@ name: Theme preview
on:
pull_request_target:
types: [opened, synchronize, reopened]
types: [opened, edited, reopened, synchronize]
branches:
- master
- theme_preview_script
paths:
- "themes/index.js"
- "scripts/preview-theme.js"
jobs:
build:
previewTheme:
runs-on: ubuntu-latest
name: Install & Preview
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: bahmutov/npm-install@v1
with:
useLockFile: false
- run: npm run preview-theme
env:
CI: true
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}