File tree Expand file tree Collapse file tree 4 files changed +50
-36
lines changed Expand file tree Collapse file tree 4 files changed +50
-36
lines changed Original file line number Diff line number Diff line change 11name : Build and Deploy
22
3+ permissions :
4+ contents : read
5+
36on :
47 workflow_call :
58 inputs :
1316 default : " /"
1417 type : string
1518 environment :
16- description : GHA environment name
19+ description : GitHub Actions environment name (used for scoping secrets and deployment)
1720 required : true
1821 type : string
1922 secrets :
3538 env :
3639 CI : true
3740 NODE_ENV : production
41+ NODE_OPTIONS : " --max-old-space-size=8192 --max-http-header-size=8192"
3842 AWS_PAGER : " "
3943 HOSTNAME : ${{ inputs.hostname }}
4044 BASE_URL : ${{ inputs.base_url }}
@@ -53,16 +57,14 @@ jobs:
5357 uses : actions/cache@v3
5458 with :
5559 path : node_modules/.cache
56- key : ${{ runner.os }}-webpack-cache
60+ key : ${{ runner.os }}-webpack-cache-${{ hashFiles('yarn.lock') }}
5761 - name : Install awscli
5862 uses : unfor19/install-aws-cli-action@v1
5963 - name : Install jq
6064 run : sudo apt-get install -y jq
6165 - name : Install dependencies
6266 run : yarn install --frozen-lockfile
6367 - name : Build the Docusaurus site
64- env :
65- NODE_OPTIONS : " --max-old-space-size=8192 --max-http-header-size=8192"
6668 run : yarn build
6769 - name : Deploy the Docusaurus site
6870 env :
Original file line number Diff line number Diff line change 11name : delete-review
22
3+ permissions :
4+ contents : read
5+
36on : delete
47
58jobs :
912 name : review/${{ github.ref_name }}
1013 env :
1114 CI : true
15+ NODE_OPTIONS : " --max-old-space-size=8192 --max-http-header-size=8192"
1216 AWS_PAGER : " "
1317 BASE_URL : /${{ github.ref_name }}/
1418 AWS_DEFAULT_REGION : us-east-1
2327 AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
2428 AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
2529 run : |
30+ echo "Removing files at s3://${S3_BUCKET_NAME}${BASE_URL}"
2631 aws s3 rm --recursive s3://${S3_BUCKET_NAME}${BASE_URL}
2732 export INVALIDATION_ID=$(
2833 aws cloudfront create-invalidation \
Original file line number Diff line number Diff line change 11name : Pull Request Checks
22
3+ permissions :
4+ contents : read
5+ pull-requests : read
6+
37on :
4- pull_request :
5- branches :
6- - main
7- merge_group :
8- types :
9- - checks_requested
8+ pull_request :
9+ branches :
10+ - main
11+ merge_group :
12+ types :
13+ - checks_requested
14+
15+ env :
16+ CI : true
17+ NODE_ENV : production
18+ NODE_OPTIONS : " --max-old-space-size=8192 --max-http-header-size=8192"
1019
1120jobs :
12- build-and-deploy :
13- runs-on : ubuntu-latest
14- env :
15- CI : true
16- NODE_ENV : production
17- steps :
18- - uses : actions/checkout@v4
19- - name : Set up Node.js
20- uses : actions/setup-node@v3
21- with :
22- node-version : ' 20.x'
23- cache : ' yarn'
24- - name : Docusaurus Webpack cache
25- uses : actions/cache@v3
26- with :
27- path : node_modules/.cache
28- key : ${{ runner.os }}-webpack-cache
29- - name : Install dependencies
30- run : yarn install --frozen-lockfile
31- - name : Build the Docusaurus site
32- env :
33- NODE_OPTIONS : " --max-old-space-size=8192 --max-http-header-size=8192"
34- run : yarn build
35- spellcheck :
36- runs-on : ubuntu-latest
37- steps :
21+ build-and-deploy :
22+ runs-on : ubuntu-latest
23+ steps :
24+ - uses : actions/checkout@v4
25+ - name : Set up Node.js
26+ uses : actions/setup-node@v3
27+ with :
28+ node-version : ' 20.x'
29+ cache : ' yarn'
30+ - name : Docusaurus Webpack cache
31+ uses : actions/cache@v3
32+ with :
33+ path : node_modules/.cache
34+ key : ${{ runner.os }}-webpack-cache-${{ hashFiles('yarn.lock') }}
35+ - name : Install dependencies
36+ run : yarn install --frozen-lockfile
37+ - name : Build the Docusaurus site
38+ run : yarn build
39+ spellcheck :
40+ runs-on : ubuntu-latest
41+ steps :
3842 - uses : actions/checkout@v4
3943 - uses : codespell-project/actions-codespell@master
4044 name : Check spelling
Original file line number Diff line number Diff line change 11name : deploy-to-production
22
3+ permissions :
4+ contents : read
5+
36on :
47 push :
58 branches :
You can’t perform that action at this time.
0 commit comments