imnya.ng/.forgejo/workflows/deploy.yml
2026-05-31 14:15:38 +09:00

34 lines
No EOL
811 B
YAML

on: [push]
jobs:
print-content:
runs-on: ubuntu-latest
steps:
- name: Run uname
run: uname -a
- name: checkout code
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install rsync
run: sudo apt-get update && sudo apt-get install -y rsync openssh-client
- name: Setup SSH Key
run: |
echo "${{ secrets.SSH_KEY }}" > ssh_key
chmod 600 ssh_key
- name: Build
run: |
bun i && bun run build
- name: Deploy
run: |
rsync -avz --delete -e "ssh -i ssh_key -o StrictHostKeyChecking=no" dist/* imnyang@10.11.8.101:/var/static/imnya.ng/.
- name: Cleanup
if: always()
run: |
rm -f ssh_key