Add gitea actions workflow for automaged deploykent
Some checks failed
Deploy Blog / deploy (push) Has been cancelled
Some checks failed
Deploy Blog / deploy (push) Has been cancelled
This commit is contained in:
37
.gitea/workflows/deploy.yml
Normal file
37
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Deploy Blog
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build site
|
||||
run: pnpm run build
|
||||
|
||||
- name: Deploy to server
|
||||
run: |
|
||||
echo "Deploying built site..."
|
||||
rm -rf /deploy/blog/*
|
||||
cp -r build/* /deploy/blog/
|
||||
echo "✅ Blog deployed successfully!"
|
||||
Reference in New Issue
Block a user