File tree Expand file tree Collapse file tree 3 files changed +16
-8
lines changed
examples/mars-theme-example Expand file tree Collapse file tree 3 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -26,16 +26,22 @@ jobs:
26
26
- name : Install dependencies
27
27
run : npm ci
28
28
29
- - name : Check if it should deploy to production
29
+ - name : Check if it should deploy to production
30
30
id : deploy
31
31
if : github.ref == 'refs/heads/master'
32
32
run : echo "::set-output name=args::--prod"
33
-
33
+
34
34
- name : Deploy to now
35
35
run : npx lerna run now --parallel -- -- ${{ steps.deploy.outputs.args }}
36
36
env :
37
37
NOW_TOKEN : ${{ secrets.NOW_TOKEN }}
38
38
39
+ - name : Create alias for this deploy
40
+ run : npx lerna run now:alias --parallel
41
+ env :
42
+ COMMIT_SHA : ${{ github.sha }}
43
+ NOW_TOKEN : ${{ secrets.NOW_TOKEN }}
44
+
39
45
lighthouse :
40
46
runs-on : ubuntu-latest
41
47
needs : deploy
@@ -52,11 +58,11 @@ jobs:
52
58
configPath : ./.github/workflows/lighthouserc.json
53
59
budgetPath : ./.github/workflows/budget.json
54
60
urls : |
55
- https://mars-theme-frontity.worona .now.sh/
56
- https://mars-theme-frontity.worona .now.sh/2016/the-beauties-of-gullfoss/
61
+ https://mars-theme-$COMMIT_SHA .now.sh/
62
+ https://mars-theme-$COMMIT_SHA .now.sh/2016/the-beauties-of-gullfoss/
57
63
env :
58
- LHCI_BUILD_CONTEXT__CURRENT_HASH : ${{ github.sha }}
59
64
LHCI_GITHUB_APP_TOKEN : ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
65
+ COMMIT_SHA : ${{ github.sha }}
60
66
61
67
- name : Save results
62
68
uses : actions/upload-artifact@v1
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " mars-theme-frontity" ,
2
+ "name" : " mars-theme" ,
3
+ "alias" : " mars.frontity.org" ,
3
4
"version" : 2 ,
4
5
"builds" : [
5
6
{
Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " example-mars-theme-example " ,
2
+ "name" : " example-mars-theme" ,
3
3
"version" : " 1.2.0" ,
4
4
"private" : true ,
5
5
"description" : " Example of a project using mars-theme." ,
10
10
"build:inspect" : " node --inspect -r ts-node/register/transpile-only ./node_modules/.bin/frontity build" ,
11
11
"serve" : " frontity serve" ,
12
12
"serve:inspect" : " node --inspect -r ts-node/register/transpile-only ./node_modules/.bin/frontity serve" ,
13
- "now" : " npx frontity build && npx now --token $NOW_TOKEN"
13
+ "now" : " npx frontity build && npx now --scope frontity --token $NOW_TOKEN" ,
14
+ "now:alias" : " npx now alias --scope frontity --token $NOW_TOKEN mars-theme-$COMMIT_SHA.now.sh"
14
15
},
15
16
"license" : " Apache-2.0" ,
16
17
"dependencies" : {
You can’t perform that action at this time.
0 commit comments