Build themes #1473
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: Build themes | |
on: | |
registry_package: | |
action: | |
- updated | |
push: | |
branches: | |
- master | |
paths: | |
- 'scripts/build-themes.js' | |
- '.github/workflows/build-themes.yml' | |
- '.github/build-themes' | |
jobs: | |
build-themes: | |
name: Build Storefront themes | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' || github.event.registry_package.name == 'storefront-template' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref }} | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '14.x' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run build | |
run: npm run themes:build | |
- name: Push output CSS to custom branch | |
uses: JamesIves/[email protected] | |
with: | |
branch: themes-dist | |
folder: dist/themes | |
clean: true |