Skip to content

Commit

Permalink
ci: improve theme-preview actiot push
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rickstaa committed Sep 27, 2022
1 parent fe1ca87 commit 6a9c635
Show file tree
Hide file tree
Showing 2 changed files with 502 additions and 119 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/preview-theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
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 }}

0 comments on commit 6a9c635

Please sign in to comment.