Refactor deployment workflow to use ubuntu-latest and simplify build and deploy steps
Some checks failed
/ print-content (push) Failing after 1s
Some checks failed
/ print-content (push) Failing after 1s
This commit is contained in:
parent
f7348d49b4
commit
aedb39a9ac
1 changed files with 10 additions and 5 deletions
|
|
@ -1,13 +1,20 @@
|
|||
on: [push]
|
||||
jobs:
|
||||
print-content:
|
||||
runs-on: native
|
||||
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
|
||||
|
|
@ -15,13 +22,11 @@ jobs:
|
|||
|
||||
- name: Build
|
||||
run: |
|
||||
source /etc/bashrc
|
||||
nix shell nixpkgs#bun --command bash -c 'bun i && chmod +x node_modules/.bin/* && bun run build'
|
||||
bun i && 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/.'
|
||||
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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue