Skip to content

Commit

Permalink
replace pages deployment with ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
nicokaiser committed Nov 22, 2024
1 parent 7fe95ba commit aae29cb
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 26 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- run: npm ci
- run: npm run build
- uses: actions/upload-artifact@v4
with:
name: bandoneon
path: dist
if-no-files-found: error
- name: Upload to server
run: |
mkdir -p ~/.ssh
chmod 700 ~/.ssh
echo "${{ secrets.ARTIFACT_SSH_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -p 22 ${{ secrets.ARTIFACT_HOST }} >> ~/.ssh/known_hosts
rsync -az --delete dist/ bandoneonapp@${{ secrets.ARTIFACT_HOST }}:/srv/bandoneonapp/public/
26 changes: 0 additions & 26 deletions .github/workflows/pages.yml

This file was deleted.

0 comments on commit aae29cb

Please sign in to comment.