File tree Expand file tree Collapse file tree 1 file changed +80
-0
lines changed Expand file tree Collapse file tree 1 file changed +80
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish documentation
2
+ #
3
+ # This workflow publishes the documentation to Fastly
4
+ #
5
+
6
+ on :
7
+ workflow_dispatch :
8
+ inputs :
9
+ deploy-message :
10
+ required : false
11
+ type : string
12
+ alias :
13
+ required : false
14
+ type : string
15
+ workflow_call :
16
+ inputs :
17
+ deploy-message :
18
+ required : false
19
+ type : string
20
+ alias :
21
+ required : false
22
+ type : string
23
+
24
+ permissions :
25
+ contents : read
26
+ pull-requests : write
27
+
28
+ jobs :
29
+ publish_site :
30
+ name : Publish to Fastly
31
+ runs-on : ubuntu-latest
32
+ timeout-minutes : 10
33
+ steps :
34
+ # # --- SETUP --- ##
35
+ - name : Check out code
36
+ uses : actions/checkout@v4
37
+ with :
38
+ fetch-depth : 0
39
+
40
+ - name : Use Node LTS version
41
+ uses : actions/setup-node@v4
42
+ with :
43
+ node-version : 20
44
+ cache : yarn
45
+
46
+ - name : Enable Corepack
47
+ run : corepack enable
48
+
49
+ # # --- YARN CACHE --- ##
50
+ - name : Check for cached dependencies
51
+ continue-on-error : true
52
+ id : cache-dependencies
53
+ uses : actions/cache@v4
54
+ with :
55
+ path : |
56
+ .cache/yarn
57
+ node_modules
58
+ key : ubuntu-latest-node20-${{ hashFiles('yarn.lock') }}
59
+
60
+ # # --- INSTALL --- ##
61
+ # note: if cache-hit isn't needed b/c yarn will leverage the cache if it exists
62
+ - name : Install dependencies
63
+ shell : bash
64
+ run : yarn install --immutable
65
+
66
+ # # --- BUILD --- ##
67
+ - name : Build storybook
68
+ shell : bash
69
+ run : yarn build:docs
70
+
71
+ # # --- DEPLOY WEBSITE TO Fastly --- ##
72
+ - name : Deploy to Fastly
73
+ uses : fastly/compute-actions/preview@v11
74
+ with :
75
+ fastly-api-token : ${{ secrets.FASTLY_API_KEY }}
76
+ github-token : ${{ secrets.GITHUB_TOKEN }}
77
+ service_id : ZRzI0ci9myQCiR14oxEmC7
78
+ comment : ${{ inputs.deploy-message }}
79
+ alias : ${{ inputs.alias }}
80
+ timeout-minutes : 10
You can’t perform that action at this time.
0 commit comments