Skip to content

Commit

Permalink
Fix Gem installation issue and update Shopify CLI deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
phapsidesGT committed Sep 5, 2024
1 parent 9bd5bd7 commit b37226f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 55 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/_ci.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/_cla.yml

This file was deleted.

20 changes: 13 additions & 7 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
push:
branches:
- main
- feature/github-actions # Change 'feature/github-actions' to main
- feature/* # Adjust branches as needed

jobs:
deploy:
Expand All @@ -20,19 +20,25 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y ruby-full build-essential
gem install bundler
- name: Install Shopify CLI
- name: Install Shopify CLI Locally
run: |
gem install 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
- name: Deploy to Shopify
env:
SHOPIFY_API_TOKEN: ${{ secrets.SHOPIFY_API_TOKEN }}
SHOPIFY_STORE: ${{ secrets.SHOPIFY_STORE }}
run: |
# Authenticate Shopify CLI
shopify login --store=$SHOPIFY_STORE --password=$SHOPIFY_API_TOKEN
# Load the updated PATH
source $GITHUB_ENV
# Check Shopify CLI version
shopify version
# Authenticate using the API token
export SHOPIFY_CLI_AUTH_TOKEN=$SHOPIFY_API_TOKEN
# Push theme to Shopify store
shopify theme push --allow-live
shopify theme push --store "$SHOPIFY_STORE" --allow-live

0 comments on commit b37226f

Please sign in to comment.