Skip to content

Commit f4663f3

Browse files
authored
Merge pull request #96 from developmentseed/fix/surge-deploy-example
Fix surge deploy example
2 parents e678d57 + 3d0824b commit f4663f3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/_workflow-samples/deploy-surge.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,21 @@ jobs:
5858
- name: Checkout
5959
uses: actions/checkout@v2
6060

61-
- name: Restore dist cache
61+
- name: Restore node_modules
6262
uses: actions/cache@v2
6363
id: cache-node-modules
64+
with:
65+
path: node_modules
66+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
67+
68+
- name: Restore dist cache
69+
uses: actions/cache@v2
70+
id: cache-dist
6471
with:
6572
path: dist
6673
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
6774

6875
- name: Deploy to Surge
6976
run: |
7077
cp ./dist/index.html ./dist/200.html
71-
npm install -g surge
72-
surge ./dist ${{ env.SURGE_DOMAIN }} --token ${{ secrets.SURGE_TOKEN }}
78+
node_modules/surge/lib/cli.js ./dist ${{ env.SURGE_DOMAIN }} --token ${{ secrets.SURGE_TOKEN }}

0 commit comments

Comments
 (0)