Created
November 29, 2023 15:45
-
-
Save bphamict/3b40becd757407b69d3a0e98539b1213 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # .gitlab-ci.yml | |
| stages: | |
| - build | |
| variables: | |
| # Define any environment variables needed for your build process | |
| SHOPIFY_STORE: "your-shopify-store.myshopify.com" | |
| SHOPIFY_API_KEY: "$SHOPIFY_API_KEY" | |
| SHOPIFY_PASSWORD: "$SHOPIFY_PASSWORD" | |
| SHOPIFY_THEME_ID: "123456789" # Replace with your actual theme ID | |
| NODE_IMAGE: "node:14" # Use a specific Node.js version as your base image | |
| before_script: | |
| - echo "Before Script: Install Dependencies" | |
| - apt-get update -qy | |
| - apt-get install -y ruby-dev # Install ruby-dev | |
| - npm install | |
| build: | |
| stage: build | |
| image: $NODE_IMAGE | |
| script: | |
| - echo "Building Shopify Theme" | |
| - npm run build # Adjust this command based on your project's build process | |
| - npm run deploy -- $SHOPIFY_STORE $SHOPIFY_API_KEY $SHOPIFY_PASSWORD $SHOPIFY_THEME_ID | |
| only: | |
| - master # Trigger the CI/CD pipeline only on changes to the master branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment