Deploy with bunny.net #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |