@@ -3,46 +3,46 @@ name: Deploy Website
33on :
44 push :
55 branches :
6- - main
7- - ' *.*'
6+ - main
7+ - ' *.*'
88
99jobs :
1010 deploy :
1111 runs-on : ubuntu-latest
1212 steps :
13-
14- - name : Checkout the website
15- uses : actions/checkout@v2
16- with :
17- repository : api-platform/website
18- ref : main
19-
20- - name : Get yarn cache directory path
21- id : yarn- cache- dir-path
22- run : echo "::set-output name=dir::$(yarn cache dir)"
23-
24- - uses : actions/ cache@v2
25- id : yarn-cache
26- with :
27- path : ${{ steps. yarn-cache-dir-path.outputs.dir }}
28- key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
29- restore-keys : |
30- ${{ runner.os }}-yarn-
31-
32- - name : Install deps
33- run : yarn install
34-
35- - name : Retrieve docs
36- run : bin/retrieve-documentation
37-
38- - name : Build website
39- env :
40- GITHUB_KEY : ${{ secrets.CONTRIBUTORS_GITHUB_TOKEN }}
41- run : yarn gatsby build
42-
43- - name : Deploy
44- uses : peaceiris/actions-gh-pages@v3
45- with :
46- github_token : ${{ secrets.GITHUB_TOKEN }}
47- publish_dir : ./public
48- cname : api-platform.com
13+ - name : Checkout the website
14+ uses : actions/checkout@v3
15+ with :
16+ repository : api-platform/website
17+ ref : main
18+
19+ - name : Get yarn cache directory path
20+ id : yarn-cache-dir- path
21+ run : echo "dir=$( yarn cache dir)" >> "$GITHUB_OUTPUT"
22+
23+ - uses : actions/cache@v3
24+ id : yarn- cache
25+ with :
26+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
27+ key : ${{ runner.os }}- yarn-${{ hashFiles('**/yarn.lock') }}
28+ restore-keys : |
29+ ${{ runner.os }}-yarn-
30+
31+ - name : Install deps
32+ run : yarn install
33+
34+ - name : Retrieve docs
35+ run : bin/retrieve-documentation
36+
37+ - name : Build website
38+ env :
39+ GITHUB_KEY : ${{ secrets.CONTRIBUTORS_GITHUB_TOKEN }}
40+ NODE_OPTIONS : --openssl-legacy-provider
41+ run : yarn gatsby build
42+
43+ - name : Deploy
44+ uses : peaceiris/actions-gh-pages@v3
45+ with :
46+ github_token : ${{ secrets.GITHUB_TOKEN }}
47+ publish_dir : ./public
48+ cname : api-platform.com
0 commit comments