Skip to content

Deploy with bunny.net #3

Deploy with bunny.net

Deploy with bunny.net #3

Workflow file for this run

name: Deploy when pushing on main
on:
push:
branches:
- "main"
jobs:
publish:
runs-on: ubuntu-latest
name: "Deploy site"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Build site
run: bun run build
- name: Upload files
uses: djang0dev/[email protected]
with:
upload: true
remove: true
storageName: ${{ secrets.BUNNY_STORAGE_NAME }}
storagePassword: ${{ secrets.BUNNY_STORAGE_PASSWORD }}
destination: "tibs.gay/"
sourcePattern: "./dist/**/*.*"
apiKey: ${{ secrets.BUNNY_API_KEY }}
purgePullZone: true
pullZoneId: ${{ secrets.BUNNY_PULL_ZONE_ID }}
- name: Deploy script
uses: BunnyWay/actions/[email protected]
with:
script_id: ${{ secrets.BUNNY_SCRIPT_ID }}
deploy_key: ${{ secrets.BUNNY_DEPLOY_KEY }}
file: "script.ts"