Skip to content

Instantly share code, notes, and snippets.

@tai-sho
Created December 19, 2020 16:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tai-sho/b278ebb800b60c79b48a2a3819aca20a to your computer and use it in GitHub Desktop.
Save tai-sho/b278ebb800b60c79b48a2a3819aca20a to your computer and use it in GitHub Desktop.
Automate deployment to Shopify with Gitlab-CI.
image: python:2
stages:
- deploy
before_script:
- curl -s https://shopify.github.io/themekit/scripts/install.py | python
deploy_staging:
stage: deploy
script:
- theme deploy -p=${STG_API_PASSWORD} -s=${STG_STORE_DOMAIN} -t=${STG_THEME_ID}
only:
- staging
environment:
name: staging
url: https://xxxxxxxxxx.myshopify.com/admin/themes
deploy_production:
stage: deploy
script:
- theme new --password=${PROD_API_PASSWORD} --store=${PROD_STORE_DOMAIN} --name=${CI_PROJECT_NAME}_${CI_JOB_ID}
only:
- master
environment:
name: production
url: https://xxxxxxxxxx.myshopify.com/admin/themes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment