From cdbf114a6f1455dc0a6fbdb0fe6992deb1b79cc6 Mon Sep 17 00:00:00 2001 From: jawhng Date: Mon, 22 Dec 2025 11:14:05 +0000 Subject: [PATCH] Add gitea actions workflow for automaged deploykent --- .gitea/workflows/deploy.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..c90e9f4 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -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!"