File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed
Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Deploy Docs
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ types : [opened, reopened]
9+ workflow_dispatch :
10+
11+ jobs :
12+ build-and-deploy :
13+ runs-on : ubuntu-latest
14+
15+ defaults :
16+ run :
17+ working-directory : .
18+
19+ steps :
20+ - name : Checkout Repository 🛎️
21+ uses : actions/checkout@v4
22+
23+ - name : Setup Node.js
24+ uses : actions/setup-node@v4
25+ with :
26+ node-version : ' 20'
27+ cache : ' yarn'
28+
29+ - name : Install Dependencies
30+ run : yarn install
31+
32+ - name : Build Project
33+ run : yarn export
34+
35+ - name : Deploy to S3
36+ if : github.ref == 'refs/heads/main' || github.event_name != 'pull_request'
37+ env :
38+ AWS_ACCESS_KEY_ID : ${{ secrets.DOCS_AWS_ACCESS_KEY_ID }}
39+ AWS_SECRET_ACCESS_KEY : ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
40+ AWS_DEFAULT_REGION : ' us-east-1'
41+ run : yarn deploy
42+
43+ - name : Invalidate CloudFront
44+ if : github.ref == 'refs/heads/main' || github.event_name != 'pull_request'
45+ env :
46+ AWS_ACCESS_KEY_ID : ${{ secrets.DOCS_AWS_ACCESS_KEY_ID }}
47+ AWS_SECRET_ACCESS_KEY : ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
48+ AWS_DEFAULT_REGION : ' us-east-1'
49+ run : yarn invalidate
You can’t perform that action at this time.
0 commit comments