Deploy Web Version to hackertab.dev #96
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |