fix versions #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Set up SSH key | |
run: | | |
mkdir -p ~/.ssh | |
echo "${{ secrets.ARTIFACT_SSH_KEY }}" > ~/.ssh/id_ed25519 | |
chmod 600 ~/.ssh/id_ed25519 | |
ssh-keyscan -p 22 -t ed25519 ${{ secrets.ARTIFACT_HOST }} >> ~/.ssh/known_hosts | |
- name: Deploy to server | |
run: | | |
rsync -az --delete dist/ bandoneonapp@${{ secrets.ARTIFACT_HOST }}:/srv/bandoneonapp/public/ |