File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Staging Deployment
2+
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ confirm_deploy :
7+ description : ' Type "yes" to confirm deployment'
8+ required : true
9+ default : ' no'
10+
11+ jobs :
12+ deploy-staging :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout code
16+ uses : actions/checkout@v4
17+
18+ - name : Setup Node.js
19+ uses : actions/setup-node@v4
20+ with :
21+ node-version : ' 18'
22+
23+ - name : Install dependencies
24+ run : yarn
25+
26+ - name : Export BUILD_MODE
27+ run : export BUILD_MODE=release
28+
29+ - name : Get version
30+ run : |
31+ FULL_VERSION=$(node -p -e "require('./lerna.json').version")
32+ MAJOR_VERSION=$(echo $FULL_VERSION | cut -d. -f1)
33+ echo "VERSION=$MAJOR_VERSION" >> $GITHUB_ENV
34+ echo "version=$MAJOR_VERSION" >> $GITHUB_OUTPUT
35+ env :
36+ BUILD_MODE : release
37+
38+ - name : Build bundle
39+ run : yarn build:bundle
40+
41+ - name : Deploy to staging
42+ run : node ./scripts/deploy/deploy-oss.js staging v${VERSION}
43+ env :
44+ OSS_ENDPOINT : ${{ secrets.OSS_ENDPOINT }}
45+ OSS_REGION : ${{ secrets.OSS_REGION }}
46+ OSS_ACCESS_KEY : ${{ secrets.OSS_ACCESS_KEY }}
47+ OSS_BUCKET : ${{ secrets.OSS_BUCKET }}
48+ OSS_SECRET_KEY : ${{ secrets.OSS_SECRET_KEY }}
You can’t perform that action at this time.
0 commit comments