Skip to content

Commit

Permalink
fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
val213 committed Sep 25, 2024
1 parent e78c69a commit 13f83f5
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/deploy-frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'

- name: Install dependencies
run: |
Expand All @@ -29,11 +29,15 @@ jobs:
cd frontend
npm run build
- name: List build directory (for debugging)
run: |
ls -la frontend/.output
- name: Upload Vue build artifacts
uses: actions/upload-artifact@v3
with:
name: vue-build
path: frontend/.output
path: frontend/.output/**

deploy:
runs-on: ubuntu-latest
Expand All @@ -49,11 +53,15 @@ jobs:
name: vue-build
path: frontend/.output

- name: List downloaded artifacts (for debugging)
run: |
ls -la frontend/.output
- name: Deploy Vue frontend
env:
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}
run: |
echo "$SSH_PRIVATE_KEY" > deploy_key
chmod 600 deploy_key
scp -o StrictHostKeyChecking=no -i deploy_key -r frontend/dist/* [email protected]:/usr/share/nginx/html/ibminscut
scp -o StrictHostKeyChecking=no -i deploy_key -r frontend/.output/* [email protected]:/usr/share/nginx/html/ibminscut
rm deploy_key

0 comments on commit 13f83f5

Please sign in to comment.