32 lines
No EOL
772 B
YAML
32 lines
No EOL
772 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
|
|
bun i && bun run build
|
|
|
|
- name: Deploy
|
|
run: |
|
|
source /etc/bashrc
|
|
nix shell nixpkgs#rsync nixpkgs#openssh
|
|
|
|
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 |