website/.forgejo/workflows/update.yaml
yourfriendoss 2779583d62
Some checks failed
/ build (push) Has been cancelled
Zay call him crazy
2025-10-19 15:21:49 +03:00

29 lines
1.2 KiB
YAML

on: [push]
jobs:
build:
runs-on: windows-node-iron
steps:
- uses: http://github.com/actions/checkout@v4
- uses: http://github.com/oven-sh/setup-bun@v2
- run: bun install
shell: powershell
- run: bun run prod
shell: powershell
- name: Install SSH Key
uses: http://github.com/shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
name: id_ed25519
known_hosts: 'just-a-placeholder-so-we-dont-get-errors'
- name: Adding Known Hosts
run: >
& 'C:\Program Files\Git\usr\bin\ssh-keyscan.exe' -t rsa vps.sad.ovh | Out-File $env:USERPROFILE\.ssh\known_hosts
shell: powershell
- name: Deploy with scp
run: scp -i C:\Users\ContainerAdministrator\.ssh\id_ed25519 -r .\dist\* ${{ secrets.SSH_USER }}@vps.sad.ovh:/var/www/sad.ovh
shell: powershell
- name: Fix permissions on server
run: |
ssh -i C:\Users\ContainerAdministrator\.ssh\id_ed25519 ${{ secrets.SSH_USER }}@vps.sad.ovh `
"find /var/www/sad.ovh -type d -exec chmod 755 {} \; && find /var/www/sad.ovh -type f -exec chmod 644 {} \;"
shell: powershell