This repository contains a GitHub Action to use the Shopify CLI 2.x from CI pipelines.
Note that Shopify CLI 2.0 is deprecated and will be sunset on May 31, 2023. We encourage using Shopify CLI 3.0 to develop apps, custom storefronts, and themes.
Documentation about Shopify CLI 3.0 and CI/CD:
Add a new step to your GitHub Actions workflow that uses shopify/shopify-cli-action
.
name: My project
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.5
- uses: shopify/shopify-cli-action@v1
with:
path: 'scripts/my_script'
auth-token: ${{ secrets.SHOPIFY_CLI_AUTH_TOKEN }}
command: 'script push'
Note: It's important that Ruby is installed through the ruby/setup-ruby
action to prevent permission-related issues using the system Ruby.