Compare commits
6 Commits
8d4125daf0
...
prod
Author | SHA1 | Date | |
---|---|---|---|
411c2efcda | |||
0a23fb19a7 | |||
202de2e4a0 | |||
d56fcfe699 | |||
a2dc8d8a0e | |||
ee8ddc4947 |
38
.gitea/workflows/build.yml
Normal file
38
.gitea/workflows/build.yml
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
name: Build Node
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- prod
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- prod
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Setup SSH
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_ed25519
|
||||||
|
chmod 600 ~/.ssh/id_ed25519
|
||||||
|
ssh-keyscan -H "molnarandrei.com" >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 24
|
||||||
|
|
||||||
|
- name: Install
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
run: |
|
||||||
|
ssh -i ~/.ssh/id_ed25519 andrei@molnarandrei.com "rm -rf ~/www/*"
|
||||||
|
scp -i ~/.ssh/id_ed25519 -r ./build/* andrei@molnarandrei.com:~/www/
|
Reference in New Issue
Block a user