Skip to content

Commit

Permalink
Fix PATH issue and debug Shopify CLI installation
Browse files Browse the repository at this point in the history
  • Loading branch information
phapsidesGT committed Sep 5, 2024
1 parent b37226f commit 21b6b04
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,26 @@ jobs:
- name: Install Shopify CLI Locally
run: |
echo "Installing Shopify CLI..."
gem install --user-install shopify-cli
echo "export PATH=\$HOME/.local/share/gem/ruby/$(ls ~/.local/share/gem/ruby)/bin:\$PATH" >> $GITHUB_ENV
# Add Ruby Gems to PATH
echo "export PATH=$(ruby -e 'print Gem.user_dir')/bin:\$PATH" >> $GITHUB_ENV
- name: Deploy to Shopify
env:
SHOPIFY_API_TOKEN: ${{ secrets.SHOPIFY_API_TOKEN }}
SHOPIFY_STORE: ${{ secrets.SHOPIFY_STORE }}
- name: Verify and Debug PATH
run: |
# Load the updated PATH
source $GITHUB_ENV
# Check Shopify CLI version
echo "Updated PATH: $PATH"
ls $(ruby -e 'print Gem.user_dir')/bin # List contents to verify shopify CLI installation
which shopify # Check if shopify is in the PATH
shopify version
- name: Deploy to Shopify
env:
SHOPIFY_CLI_AUTH_TOKEN: ${{ secrets.SHOPIFY_API_TOKEN }}
SHOPIFY_STORE: ${{ secrets.SHOPIFY_STORE }}
run: |
# Authenticate using the API token
export SHOPIFY_CLI_AUTH_TOKEN=$SHOPIFY_API_TOKEN
export SHOPIFY_CLI_AUTH_TOKEN=$SHOPIFY_CLI_AUTH_TOKEN
# Push theme to Shopify store
shopify theme push --store "$SHOPIFY_STORE" --allow-live

0 comments on commit 21b6b04

Please sign in to comment.