-
Notifications
You must be signed in to change notification settings - Fork 94
45 lines (38 loc) · 1.2 KB
/
deploy.yml
File metadata and controls
45 lines (38 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: '✅ [PROD] Deploy web version'
run-name: Deploy Web app to Production ${{ github.ref_name }}
on:
workflow_dispatch:
env:
VITE_BUILD_TARGET: 'web'
VITE_AMPLITUDE_KEY: ${{ secrets.REACT_APP_AMPLITUDE_KEY }}
VITE_AMPLITUDE_URL: ${{ secrets.REACT_APP_AMPLITUDE_URL }}
VITE_API_URL: ${{ secrets.API_URL }}
VITE_FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }}
VITE_SENTRY_DSN: ${{ secrets.VITE_SENTRY_DSN }}
VITE_SENTRY_TOKEN: ${{ secrets.VITE_SENTRY_TOKEN }}
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
ref: ${{ github.ref_name }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
run: yarn
- name: Build project
run: yarn build:web
- name: Copy build to remote host
uses: appleboy/scp-action@v0.1.4
with:
host: ${{ secrets.DEPLOY_SSH_HOST }}
username: ${{ secrets.DEPLOY_SSH_USERNAME }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
source: 'dist/'
target: '~/hackertab.dev'
rm: true