Skip to content

fix: typo on GH action #37

fix: typo on GH action

fix: typo on GH action #37

Workflow file for this run

name: Deploy to Server
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: "20"
- name: Set up Nuxt UI Pro license
run: |
echo "NUXT_UI_PRO_LICENSE=${{ secrets.NUXT_UI_PRO_LICENSE }}" > .env
env:
NUXT_UI_PRO_LICENSE: ${{ secrets.NUXT_UI_PRO_LICENSE }}
- name: Install dependencies
run: npm install
- name: Build Nuxt.js app
run: npm run build
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Copy Files via SCP
run: scp -r ./ ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }}:${{ secrets.SERVER_DEPLOY_PATH }}
- name: Restart Docker Compose
run: |
ssh ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} << 'EOF'
cd ${{ secrets.SERVER_DEPLOY_PATH }}
sudo docker-compose up -d --build
EOF