38 lines
No EOL
970 B
YAML
38 lines
No EOL
970 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
|
|
chown -R $(id -u):$(id -g) $GITHUB_WORKSPACE
|
|
|
|
- name: Setup SSH Key
|
|
run: |
|
|
mkdir -p ~/.ssh
|
|
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/id_ed25519
|
|
chmod 600 ~/.ssh/id_ed25519
|
|
|
|
- name: Build
|
|
run: |
|
|
bun i
|
|
bun run build
|
|
|
|
- name: Deploy
|
|
run: |
|
|
rsync -avz --delete -e "ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=no" "$GITHUB_WORKSPACE/dist/" imnyang@10.11.8.101:/var/static/imnya.ng/
|
|
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
rm -rf ~/.ssh/id_ed25519 |