Skip to content

Commit

Permalink
Fix GitHub Actions workflow syntax and Shopify CLI setup
Browse files Browse the repository at this point in the history
  • Loading branch information
phapsidesGT committed Sep 3, 2024
1 parent ba194c6 commit dcfb840
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# .github/workflows/deploy-shopify-theme.yml

name: Deploy Shopify Theme

on:
Expand All @@ -16,7 +18,7 @@ jobs:

- name: Set up Shopify CLI
run: |
curl -s https://shopify.dev/tools/cli/install | sh
curl -s https://shopify.dev/tools/cli/install.sh | sh
shopify version
- name: Deploy to Shopify
Expand All @@ -26,8 +28,8 @@ jobs:
THEME_ID: ${{ secrets.THEME_ID }}
run: |
# Configure Shopify CLI
shopify config set store $SHOPIFY_STORE
shopify config set password $SHOPIFY_PASSWORD
shopify config set store "$SHOPIFY_STORE"
shopify config set password "$SHOPIFY_PASSWORD"
# Retry logic to push theme to Shopify store
attempt=0
Expand All @@ -36,7 +38,7 @@ jobs:
while [ $attempt -lt $max_attempts ]; do
echo "Pushing theme (Attempt: $((attempt + 1))/$max_attempts)..."
if shopify theme push --store "$SHOPIFY_STORE" --password "$SHOPIFY_PASSWORD" --theme "$THEME_ID" --allow-live; then
if shopify theme push --store "$SHOPIFY_STORE" --password "$SHOPIFY_PASSWORD" --theme-id "$THEME_ID" --allow-live; then
echo "Theme pushed successfully."
break
else
Expand Down

0 comments on commit dcfb840

Please sign in to comment.