move to gitea workflow
Some checks failed
Build and Deploy Blog / deploy (pull_request) Failing after 31s
Some checks failed
Build and Deploy Blog / deploy (pull_request) Failing after 31s
This commit is contained in:
34
.gitea/workflows/deploy.yml
Normal file
34
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
name: Build and Deploy Blog
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: debian-trixie # Matches your runner label
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build Astro site
|
||||
run: npm run build
|
||||
|
||||
- name: Setup SSH key
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "${{ secrets.NANODE_SSH_KEY }}" > ~/.ssh/deploy_key
|
||||
chmod 600 ~/.ssh/deploy_key
|
||||
ssh-keyscan -H ${{ secrets.NANODE_HOST }} >> ~/.ssh/known_hosts
|
||||
|
||||
- name: Deploy to Nanode
|
||||
run: |
|
||||
rsync -avz --delete \
|
||||
-e "ssh -i ~/.ssh/deploy_key" \
|
||||
dist/ ${{ secrets.NANODE_USER }}@${{ secrets.NANODE_HOST }}:/var/www/smrising.com/
|
||||
Reference in New Issue
Block a user