├── .github └── FUNDING.yml ├── Dockerfile ├── LICENSE ├── README.md └── action.yml /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: pgrimaud 4 | custom: https://www.paypal.me/grimaudpierre 5 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ghcr.io/pgrimaud/themekit:latest 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Pierre Grimaud 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Deploy Shopify theme for GitHub Actions 2 | 3 | ### NEW since 2.2 : this action is now based on a pre-built image 4 | ``` 5 | Using a pre-built image saved 115% of time on this action set-up 6 | ``` 7 | 8 | ⚠️ Docker image is located here : https://github.com/pgrimaud/docker-images/tree/master/themekit 9 | 10 | ## Description 11 | 12 | This GitHub action is part of a list of my Actions : https://github.com/pgrimaud/actions. 13 | 14 | **A GitHub Actions+Shopify workflow was proposed here : https://github.com/freyum/shopify-workflow-poc** 15 | 16 | ## Usage 17 | 18 | To use the action simply add the following lines to your workflow .yml file. 19 | 20 | ```yaml 21 | ... 22 | steps: 23 | - uses: actions/checkout@v2 24 | - name: Shopify 25 | uses: pgrimaud/action-shopify@master 26 | env: 27 | SHOPIFY_PASSWORD: ${{ secrets.SHOPIFY_PASSWORD }} 28 | SHOPIFY_STORE_URL: ${{ secrets.SHOPIFY_STORE_URL }} 29 | SHOPIFY_THEME_ID: ${{ secrets.SHOPIFY_THEME_ID }} 30 | THEME_PATH: ${{ secrets.THEME_PATH }} 31 | ``` 32 | 33 | You can see a repository with this action here : https://github.com/pgrimaud/shopify-debut 34 | 35 | ### Required Secrets 36 | 37 | First you have to generate a private app to get an API KEY on Shopify. [Get API Access](https://shopify.github.io/themekit/#get-api-access). 38 | 39 | Then you'll need to provide some secrets to use the action. 40 | 41 | * **SHOPIFY_PASSWORD**: Your password from your private app previously created. 42 | * **SHOPIFY_STORE_URL**: Your store url. (e.g. `demo.myshopify.com`). 43 | * **SHOPIFY_THEME_ID**: Your theme id on your Shopify Store. 44 | * **THEME_PATH**: Path of your theme on your GitHub repository. If your theme is at the root of your repository, just use `./`. 45 | 46 | ### Optional Arguments 47 | 48 | The optional argument you can add to improve theme deployment. Optional args are available on [Theme Kit help](https://shopify.github.io/themekit/configuration/#flags). 49 | 50 | #### Examples 51 | 52 | ```yaml 53 | ... 54 | steps: 55 | - uses: actions/checkout@v2 56 | - name: Shopify 57 | uses: pgrimaud/action-shopify@master 58 | env: 59 | SHOPIFY_PASSWORD: ${{ secrets.SHOPIFY_PASSWORD }} 60 | SHOPIFY_STORE_URL: ${{ secrets.SHOPIFY_STORE_URL }} 61 | SHOPIFY_THEME_ID: ${{ secrets.SHOPIFY_THEME_ID }} 62 | THEME_PATH: ${{ secrets.THEME_PATH }} 63 | with: 64 | args: --ignored-file=sections/* 65 | ``` 66 | 67 | Your can also combine multiple arguments : 68 | 69 | ```yaml 70 | ... 71 | steps: 72 | - uses: actions/checkout@v2 73 | - name: Shopify 74 | uses: pgrimaud/action-shopify@master 75 | env: 76 | SHOPIFY_PASSWORD: ${{ secrets.SHOPIFY_PASSWORD }} 77 | SHOPIFY_STORE_URL: ${{ secrets.SHOPIFY_STORE_URL }} 78 | SHOPIFY_THEME_ID: ${{ secrets.SHOPIFY_THEME_ID }} 79 | THEME_PATH: ${{ secrets.THEME_PATH }} 80 | with: 81 | args: --ignored-file=sections/* --timeout=30 82 | ``` 83 | 84 | ## License 85 | 86 | The Dockerfile and associated scripts and documentation in this project are released under the [MIT License](LICENSE). 87 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Deploy Shopify theme' 2 | author: 'Pierre Grimaud' 3 | description: 'Deploy Shopify theme with Theme Kit' 4 | runs: 5 | using: 'docker' 6 | image: 'Dockerfile' 7 | branding: 8 | icon: 'shopping-bag' 9 | color: 'green' 10 | --------------------------------------------------------------------------------