-
Notifications
You must be signed in to change notification settings - Fork 80
40 lines (33 loc) · 963 Bytes
/
deploy.yml
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
name: Deploy Web Version to hackertab.dev
on:
workflow_dispatch:
push:
branches:
- feat/cp-build
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 }}
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '16'
- name: Install dependencies
run: yarn
- name: Build project
run: yarn build:web
- name: Copy build to remote host
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOY_SSH_HOST }}
username: ${{ secrets.DEPLOY_SSH_USERNAME }}
key: ${{ secrets.DEPLOY_SSH_KEY }}
source: 'dist/'
target: '~/hackertab.dev/dist'