Skip to content

Commit

Permalink
Upate README.md + ready to release
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrimaud committed Aug 31, 2019
1 parent bf39efb commit 7035e19
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 26 deletions.
63 changes: 44 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
# Shopify Theme for GitHub Actions
# Publish Shopify theme for GitHub Actions

This GitHub action is part of a list of my Actions : https://github.com/pgrimaud/actions.

## Usage

To use the action simply add the following lines to your `.github/main.workflow`

![alt text](https://user-images.githubusercontent.com/1866496/52805959-17883a00-3088-11e9-9804-e5f2b2c4ad59.png)

```
action "Shopify" {
uses = "pgrimaud/actions/shopify@master"
args = ""
secrets = [
"SHOPIFY_PASSWORD",
"SHOPIFY_STORE_URL",
"SHOPIFY_THEME_ID",
"THEME_PATH"
]
}
To use the action simply add the following lines to your workflow .yml file.

```yaml
...
steps:
- uses: actions/checkout@v1
- name: Shopify
uses: pgrimaud/action-shopify@master
env:
SHOPIFY_PASSWORD: ${{ secrets.SHOPIFY_PASSWORD }}
SHOPIFY_STORE_URL: ${{ secrets.SHOPIFY_STORE_URL }}
SHOPIFY_THEME_ID: ${{ secrets.SHOPIFY_THEME_ID }}
THEME_PATH: ${{ secrets.THEME_PATH }}
```
You can see a repository with this action here : https://github.com/pgrimaud/shopify-debut
### Required Secrets
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).
Expand All @@ -38,12 +38,37 @@ The optionnal argument you can add to improve theme deployment. Optionnal args a

#### Examples

* ```args = "--ignored-file=\"config/*\""```
* ```args = "--timeout=30"```
```yaml
...
steps:
- uses: actions/checkout@v1
- name: Shopify
uses: pgrimaud/action-shopify@master
env:
SHOPIFY_PASSWORD: ${{ secrets.SHOPIFY_PASSWORD }}
SHOPIFY_STORE_URL: ${{ secrets.SHOPIFY_STORE_URL }}
SHOPIFY_THEME_ID: ${{ secrets.SHOPIFY_THEME_ID }}
THEME_PATH: ${{ secrets.THEME_PATH }}
with:
args: --ignored-file=sections/*
```

Your can also combine multiple arguments :

* ```args = "--ignored-file=\"config/*\" --timeout=30"```
```yaml
...
steps:
- uses: actions/checkout@v1
- name: Shopify
uses: pgrimaud/action-shopify@master
env:
SHOPIFY_PASSWORD: ${{ secrets.SHOPIFY_PASSWORD }}
SHOPIFY_STORE_URL: ${{ secrets.SHOPIFY_STORE_URL }}
SHOPIFY_THEME_ID: ${{ secrets.SHOPIFY_THEME_ID }}
THEME_PATH: ${{ secrets.THEME_PATH }}
with:
args: --ignored-file=sections/* --timeout=30
```

## License

Expand Down
8 changes: 1 addition & 7 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
#!/bin/sh

echo $INPUT_ARGS

cd $THEME_PATH

echo configure --password=$SHOPIFY_PASSWORD --store=$SHOPIFY_STORE_URL --themeid=$SHOPIFY_THEME_ID $INPUT_ARGS
theme configure --password=$SHOPIFY_PASSWORD --store=$SHOPIFY_STORE_URL --themeid=$SHOPIFY_THEME_ID $INPUT_ARGS

theme configure --password=$SHOPIFY_PASSWORD --store=$SHOPIFY_STORE_URL --themeid=$SHOPIFY_THEME_ID --dir=$THEME_PATH $INPUT_ARGS
theme deploy

0 comments on commit 7035e19

Please sign in to comment.