Skip to content

Do not buil on push to master as the auto-deploy script already does … #4

Do not buil on push to master as the auto-deploy script already does …

Do not buil on push to master as the auto-deploy script already does … #4

# Deploy Theme to Store when new changes are pushed to master branch
name: Deploy Theme to Store
on:
workflow_dispatch:
push:
branches: [ master, main ]
jobs:
build:
runs-on: ubuntu-latest
environment:
name: demo.space48apps.com
url: https://demo.space48apps.com
strategy:
matrix:
node: [18.x]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2-beta
with:
node-version: ${{ matrix.node }}
- name: npm cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Stencil CLI Dependency
run: npm install -g @bigcommerce/stencil-cli
- name: Install Dependencies
run: npm ci
#
# You must configure store credentials as secrets on your GitHub repo for automatic deployment via GitHub Actions
# This defaults to pushing the theme to channel ID 1, which is the default storefront. If you wish to push to an
# Alternate storefront, use a different channel ID
#
- name: Connect to store
env:
URL: ${{ vars.STENCIL_STORE_URL_PRODUCTION }}
TOKEN: ${{ secrets.STENCIL_ACCESS_TOKEN_PRODUCTION }}
run: stencil init -u $URL -t $TOKEN -p 3000 -h https://api.bigcommerce.com
- name: Push theme live, automatically deleting oldest theme if necessary
run: stencil push -a -d -c 1