ci: 持续部署
This commit is contained in:
39
.gitea/workflows/deploy.yml
Normal file
39
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
name: 'CD'
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: 🛠 setup pnpm
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
|
||||
- name: ⚙ Install dependencies
|
||||
run: pnpm i
|
||||
|
||||
- name: 🔨 Genereate project
|
||||
run: pnpm generate
|
||||
|
||||
- name: 📂 Sync deployment
|
||||
uses: SamKirkland/FTP-Deploy-Action@4.3.5
|
||||
with:
|
||||
server: ${{ secrets.FTP_SERVER }}
|
||||
port: ${{ secrets.FTP_PORT }}
|
||||
username: ${{ secrets.FTP_USERNAME }}
|
||||
password: ${{ secrets.FTP_PASSWORD }}
|
||||
local-dir: dist
|
||||
server-dir: /
|
||||
exclude: .gitignore
|
||||
Reference in New Issue
Block a user