name: Deploy Docs on: push: paths: - "vitepress-docs/**" branches: - main tags: - "*" jobs: deploy: runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout uses: actions/checkout@v4 - name: Install Node.js uses: actions/setup-node@v4 with: node-version: 18 - uses: pnpm/action-setup@v3 name: Install pnpm id: pnpm-install with: version: 8 run_install: false - name: Deploy Docs for ${{github.ref_name}} run: | cd vitepress-docs/ pnpm install --no-frozen-lockfile if [[ ${{github.ref}} == refs/tags/* ]]; then export TAG_NAME=${{github.ref_name}} else export TAG_NAME=$(git describe --tags --abbrev=0) fi echo "Deploying docs for tag $TAG_NAME" pnpm run deploy env: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}