Skip to content

Update main.yml

Update main.yml #24

Workflow file for this run

# https://github.com/actions/deploy-pages#usage
name: Deploy to Ukraina com ua
on:
workflow_dispatch:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy with rsync
uses: burnett01/rsync-deployments@7.0.1
with:
switches: -avzr --delete
path: .
remote_host: ${{ secrets.REMOTE_HOST }}
remote_user: ${{ secrets.REMOTE_USER }}
remote_key: ${{ secrets.REMOTE_KEY }}
remote_path: ${{ secrets.REMOTE_PATH }}
- name: deploy
env:
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
REMOTE_KEY: ${{ secrets.REMOTE_KEY }}
REMOTE_PATH: ${{ secrets.REMOTE_PATH }}
uses: actions/setup-node@v4
with:
node-version: "18"
- run: corepack enable
- run: |
ssh -i ${{ secrets.REMOTE_KEY }} -o StrictHostKeyChecking=no ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }} << 'EOF'
export REMOTE_PATH=$REMOTE_PATH
cd $REMOTE_PATH
rm -rf node_modules package-lock.json
npm install --legacy-per-deps
npx nuxt build
EOF