diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 1d56528..c4097be 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -10,22 +10,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + run: | + git clone --depth 1 --branch ${{ github.ref_name }} ${{ github.server_url }}/${{ github.repository }}.git . - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: 22 - - - name: Install dependencies - run: npm ci - - - name: Build - run: npm run build - - - name: Deploy to Cloudflare Pages - uses: cloudflare/wrangler-action@v3 - with: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy dist/ --project-name=crashtestdev \ No newline at end of file + - name: Build and deploy + run: | + npm ci + npm run build + npx wrangler pages deploy dist/ --project-name=crashtestdev + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}