New start #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflows/deploy-shopify-theme.yml | |
name: Deploy Shopify Theme | |
on: | |
push: | |
branches: | |
- main | |
- feature/github-actions # Change 'feature/github-actions' to main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Ruby environment | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y ruby-full build-essential | |
gem install bundler | |
- name: Install Shopify CLI | |
run: | | |
gem install shopify-cli | |
- 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 | |
# Push theme to Shopify store | |
shopify theme push --allow-live |