forked from Shopify/dawn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b3b64b
commit 38c6874
Showing
1 changed file
with
17 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,27 @@ | ||
name: CI/CD Pipeline for Shopify | ||
name: Theme deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- feature/github-actions # Change 'feature/github-actions' to main | ||
on: [push] | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to Shopify Store | ||
name: Deploy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
node-version: 18 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.1 | ||
bundler: 'latest' | ||
- name: Install Shopify CLI | ||
run: npm install -g @shopify/cli @shopify/theme | ||
|
||
- name: Authenticate Shopify CLI | ||
env: | ||
SHOPIFY_CLI_AUTH_TOKEN: ${{ secrets.SHOPIFY_CLI_AUTH_TOKEN }} | ||
SHOPIFY_PASSWORD: ${{ secrets.SHOPIFY_PASSWORD }} | ||
run: echo $SHOPIFY_CLI_AUTH_TOKEN | shopify login | ||
|
||
- name: Deploy Theme to Shopify | ||
run: npm install -g @shopify/cli | ||
- name: Deploy | ||
env: | ||
SHOPIFY_STORE_URL: ${{ secrets.SHOPIFY_STORE_URL }} | ||
SHOPIFY_THEME_ID: ${{ secrets.SHOPIFY_THEME_ID }} | ||
# Store URL, like your-store.myshopify.com | ||
SHOPIFY_STORE_URL: '${{ secrets.SHOPIFY_STORE_URL }}' | ||
# Password generated from Theme Access app | ||
SHOPIFY_CLI_AUTH_TOKEN: ${{ secrets.SHOPIFY_CLI_AUTH_TOKEN }} | ||
run: shopify theme push --verbose --allow-live --store=${{ secrets.SHOPIFY_STORE_URL }} --theme=${{ secrets.SHOPIFY_THEME_ID }} | ||
SHOPIFY_CLI_TTY: 0 | ||
run: shopify theme push --path / --allow-live --store=${{ secrets.SHOPIFY_STORE_URL }} --theme=${{ secrets.SHOPIFY_THEME_ID }} |