项目作者: wyugen

项目描述 :
Deploy Previews for Shopify themes
高级语言: JavaScript
项目地址: git://github.com/wyugen/shopify-theme-action.git
创建时间: 2020-09-06T23:57:55Z
项目社区:https://github.com/wyugen/shopify-theme-action

开源协议:MIT License

下载


Shopify Theme Deploy Previews Action

Deploy Previews for Pull Requests in theme repositories. 🚧

Screenshot

Getting Started

The Action creates a new theme for every opened pull request and updates the same theme when the pull request in updated.

Because, it can lead to a large number of theme, it is recommended to use development stores.

Save this file to .github/workflows as deploy_preview.yaml:

  1. name: 'Deploy Preview'
  2. on: [pull_request]
  3. jobs:
  4. deploy:
  5. runs-on: ubuntu-latest
  6. name: 'Deployment'
  7. steps:
  8. - name: Checkout Repository
  9. uses: actions/checkout@v2
  10. - name: 'Deploy Theme'
  11. uses: wyugen/shopify-theme-action@v0.3
  12. with:
  13. SHOPIFY_STORE: ${{secrets.DP_SHOPIFY_STORE}}
  14. SHOPIFY_APP_PW: ${{secrets.DP_SHOPIFY_APP_PW}}
  15. SHOPIFY_API_KEY: ${{secrets.DP_SHOPIFY_API_KEY}}
  16. github-token: ${{secrets.GITHUB_TOKEN}}

Required Input Parameters

  • SHOPIFY_STORE: The shopify store URL where theme would be deployed, in format of demo-store.myshopify.com
  • SHOPIFY_APP_PW: The private app’s password
  • SHOPIFY_API_KEY: The private app’s API Key
  • github-token: GitHub token used to post comments (autofilled)

Because the theme ids are dynamically generated, the action does not honour config.yaml. To get these variables, refer themekit documentation

Using with your build tools (or Slate)

To use it with slate or another build tool, adding the build command after checkout would automatically ship the build version.