Skip to content

fix: removed unused modules #46

fix: removed unused modules

fix: removed unused modules #46

Workflow file for this run

name: Deploy
on:
pull_request:
types: [closed]
branches: [main]
jobs:
deploy:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
env:
VITE_BASE_URL: 'https://trywooster.live/api'
VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }}
VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }}
run: npm run build
- name: Prepare deploy directory
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
script: |
sudo rm -rf /home/wooster/frontend/dist
sudo mkdir -p /home/wooster/frontend/dist
sudo chown -R wooster:www-data /home/wooster/frontend/dist
sudo chmod -R 775 /home/wooster/frontend/dist
- name: Deploy to server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.SSH_PASSPHRASE }}
source: 'dist/'
target: '/home/wooster/frontend'