👨💻 [DEV] Deploy web version #26
This file contains hidden or 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: '👨💻 [DEV] Deploy develop to web environment' | |
| 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@v4 | |
| with: | |
| ref: develop | |
| - 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 --mode development | |
| - 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-develop' | |
| rm: true |