Skip to content

Commit b9dcf23

Browse files
committed
Fix Yarn cache
1 parent 77127f1 commit b9dcf23

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

.circleci/config.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ jobs:
1212
name: Restore Yarn Package Cache
1313
keys:
1414
- yarn-packages-{{ checksum "yarn.lock" }}
15-
- run: yarn
15+
- run:
16+
name: Install Yarn Dependencies
17+
command: yarn
1618
- save_cache:
1719
name: Save Yarn Package Cache
1820
key: yarn-packages-{{ checksum "yarn.lock" }}
1921
paths:
20-
- ~/.cache/yarn
22+
- ./node_modules
2123
# Lint Theme
2224
- run: yarn lint
2325
# Build Theme into .Zip
@@ -28,16 +30,14 @@ jobs:
2830
command: |
2931
mkdir export
3032
cp starter-theme.zip export/theme.zip
31-
# - store_artifacts:
32-
# path: /tmp/artifacts
33-
# - store_artifacts:
34-
# path: export
35-
# Upload to Netlify & Deploy
36-
#NETLIFY_SITE_ID
37-
#NETLIFY_AUTH_TOKEN
38-
- run: ./node_modules/.bin/netlify deploy --dir=export --auth=${NETLIFY_AUTH_TOKEN} --site=${NETLIFY_SITE_ID} --prod
33+
# Upload to Netlify & Deploy (Public Url for Shopify to Fetch Theme)
34+
- run:
35+
name: Upload Theme.zip to Netlify
36+
command: ./node_modules/.bin/netlify deploy --dir=export --auth=${NETLIFY_AUTH_TOKEN} --site=${NETLIFY_SITE_ID} --prod
3937
# Upload Theme to Shopify
40-
- run: .circleci/theme-upload.js
38+
- run:
39+
name: Upload Theme to Shopify
40+
command: .circleci/theme-upload.js
4141
# List Shopify Themes
4242
- run: yarn list-themes
4343
# Continously Check for Preview Available (Can browser test...)

.circleci/theme-upload.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env node
22

33
const Shopify = require('shopify-api-node');
4-
//const program = require('commander');
54
const bot = require('circle-github-bot').create();
65

76
require('dotenv').config();
@@ -33,11 +32,7 @@ const shopify = new Shopify({
3332
🌈 Create New Theme Based on Build
3433
*/
3534
const themeName = `Debut-${Date.now()}`;
36-
//const themeUrl = `${process.env.CIRCLE_BUILD_URL}/artifacts/0/${process.env.HOME}/repo/export/theme.zip`;
37-
const themeUrl = `https://5ce8c36a43aa24a5254486fb--loving-turing-94c788.netlify.com/theme.zip`;
38-
39-
//console.log(`${process.env.CIRCLE_BUILD_URL}/artifacts/0/tmp/artifacts/theme.zip`);
40-
console.log(themeUrl);
35+
const themeUrl = `https://loving-turing-94c788.netlify.com/theme.zip`;
4136

4237
shopify.theme.create({
4338
name: themeName,

0 commit comments

Comments
 (0)