Skip to content

Commit 3220e0b

Browse files
authored
Merge pull request #245 from medyo/feat-deploy-dev
feat: add GitHub Actions workflow for deploying the develop branch
2 parents c1e22ed + e9904ba commit 3220e0b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/develop.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy Develop branch to the web version
2+
on:
3+
workflow_dispatch:
4+
5+
env:
6+
VITE_BUILD_TARGET: 'web'
7+
VITE_AMPLITUDE_KEY: ${{ secrets.REACT_APP_AMPLITUDE_KEY }}
8+
VITE_AMPLITUDE_URL: ${{ secrets.REACT_APP_AMPLITUDE_URL }}
9+
VITE_API_URL: ${{ secrets.API_URL }}
10+
VITE_FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}
11+
12+
jobs:
13+
build_and_deploy:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
ref: develop
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'

0 commit comments

Comments
 (0)