diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index f0c1ffb..ea12108 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -9,29 +9,17 @@ on: jobs: build-and-deploy: - runs-on: ubuntu-latest + runs-on: self-hosted steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: '20' - - - name: Setup pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - - - name: Install dependencies - run: pnpm install - - - name: Build project - run: pnpm build - - - name: Deploy to server + - name: Build and Deploy run: | + cd /tmp + rm -rf tashow-build + git clone -b ${{ github.ref_name }} http://gitea.tashowz.com/tashow/tashow-manager.git tashow-build + cd tashow-build + pnpm install + pnpm build rsync -av --delete dist/ /home/1panel/www/sites/admin.petshy.tashowz.com/index/ + rm -rf /tmp/tashow-build echo "Deployed successfully!"