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

29 lines
No EOL
813 B
YAML

on: [push]
jobs:
print-content:
runs-on: native
steps:
- name: Run uname
run: uname -a
- name: checkout code
uses: actions/checkout@v4
- name: Setup SSH Key
run: |
echo "${{ secrets.SSH_KEY }}" > ssh_key
chmod 600 ssh_key
- name: Build
run: |
source /etc/bashrc
nix shell nixpkgs#bun --command bash -c 'bun i && chmod +x node_modules/.bin/* && bun run build'
- name: Deploy
run: |
source /etc/bashrc
nix shell nixpkgs#rsync nixpkgs#openssh --command bash -c '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