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 : Deploy Develop branch to the web version
2+ on :
3+ workflow_dispatch :
4+ push :
5+ branches :
6+ - feat/cp-build
7+ env :
8+ VITE_BUILD_TARGET : ' web'
9+ VITE_AMPLITUDE_KEY : ${{ secrets.REACT_APP_AMPLITUDE_KEY }}
10+ VITE_AMPLITUDE_URL : ${{ secrets.REACT_APP_AMPLITUDE_URL }}
11+ VITE_API_URL : ${{ secrets.API_URL }}
12+ VITE_FIREBASE_API_KEY : ${{ secrets.FIREBASE_API_KEY }}
13+
14+ jobs :
15+ build_and_deploy :
16+ runs-on : ubuntu-latest
17+
18+ steps :
19+ - name : Checkout code
20+ uses : actions/checkout@v4
21+
22+ - name : Set up Node.js
23+ uses : actions/setup-node@v4
24+ with :
25+ node-version : 18
26+
27+ - name : Install dependencies
28+ run : yarn
29+
30+ - name : Build project
31+ run : yarn build:web
32+
33+ - name : Copy build to remote host
34+ uses : appleboy/scp-action@v0.1.4
35+ with :
36+ host : ${{ secrets.DEPLOY_SSH_HOST }}
37+ username : ${{ secrets.DEPLOY_SSH_USERNAME }}
38+ key : ${{ secrets.DEPLOY_SSH_KEY }}
39+ source : ' dist/'
40+ target : ' ~/hackertab.dev-develop'
You can’t perform that action at this time.
0 commit comments