Skip to content

Merge branch 'master' of github.com:sacred-art/bigcommerce-theme #1

Merge branch 'master' of github.com:sacred-art/bigcommerce-theme

Merge branch 'master' of github.com:sacred-art/bigcommerce-theme #1

Workflow file for this run

# 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
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: ${{ secrets.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