name: Deploy concurrency: group: deploy-${{ github.ref }} cancel-in-progress: true on: push: branches: - 'main' jobs: build: runs-on: ubuntu-latest steps: - uses: https://github.com/oven-sh/setup-bun@v2 with: bun-version: latest - uses: actions/checkout@v6 - run: bun ci - run: bun run build - uses: actions/upload-artifact@v3 with: name: production-files path: dist/ deploy: runs-on: ubuntu-latest needs: build if: ${{ vars.STAPLER_TARGET != '' }} steps: - uses: actions/download-artifact@v3 with: name: production-files path: ./dist - run: tar -czC dist -f dist.tar.gz . - run: | curl -s -X PUT --data-binary "@dist.tar.gz" \ -H 'X-Token: ${{ secrets.STAPLER_TOKEN }}' \ ${{ vars.STAPLER_CURL_ARGS }} \ ${{ vars.STAPLER_TARGET }}