Files
tape-record/.github/workflows/deploy.yml
T
klemek d10bf17aca
Lint / Oxlint (push) Successful in 14m29s
Lint / TypeScript (push) Successful in 15m7s
Deploy / Build (push) Successful in 15m8s
Lint / ESLint (push) Successful in 15m8s
Deploy / Deploy to Stapler (push) Has been cancelled
ci(deploy): curl fail with body
2026-05-02 22:25:17 +02:00

50 lines
1.2 KiB
YAML

name: Deploy
concurrency:
group: deploy-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- "main"
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
steps:
- name: Set up Bun
uses: actions/setup-bun@v2
- name: Checkout repository
uses: actions/checkout@v6
- name: Install dependencies
run: bun ci
- name: Build project
run: bun run build
- name: Upload production files
uses: actions/upload-artifact@v3
with:
name: production-files
path: dist/
stapler:
name: "Deploy to Stapler"
runs-on: ubuntu-latest
needs: build
if: ${{ vars.STAPLER_TARGET != '' }}
steps:
- name: Download production files
uses: actions/download-artifact@v3
with:
name: production-files
path: ./dist
- name: Compress production files
run: tar -czC dist -f dist.tar.gz .
- name: Upload to Stapler server
run: |
curl -s -X PUT --fail-with-body --data-binary "@dist.tar.gz" \
-H 'X-Token: ${{ secrets.STAPLER_TOKEN }}' \
${{ vars.STAPLER_CURL_ARGS }} \
${{ vars.STAPLER_TARGET }}