From 33c80f1280c888b6a56de6601165dd833e692b17 Mon Sep 17 00:00:00 2001 From: John Bowdre Date: Thu, 6 Jun 2024 18:05:16 -0500 Subject: [PATCH] preview: deploy to bunny --- .github/workflows/deploy-preview.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 65658db..97c5dd5 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -1,4 +1,4 @@ -name: Deploy Preview to Neocities +name: Deploy Preview to Bunny # only run on changes to preview on: @@ -42,16 +42,19 @@ jobs: chmod 644 ~/.ssh/known_hosts - name: Build with Hugo run: HUGO_REMOTE_FONT_PATH=${{ secrets.REMOTE_FONT_PATH }} hugo --minify --environment preview - - name: Insert 404 page - run: | - cp public/404/index.html public/not_found.html - name: Highlight with Torchlight run: | npm i @torchlight-api/torchlight-cli npx torchlight - - name: Deploy to Neocities - uses: bcomnes/deploy-to-neocities@v1 + - name: Deploy to Bunny + uses: ayeressian/bunnycdn-storage-deploy@v2.2.2 with: - api_token: ${{ secrets.NEOCITIES_PREVIEW_API_TOKEN }} - cleanup: true - dist_dir: public \ No newline at end of file + source: public + destination: / + storageZoneName: "${{ secrets.BUNNY_STORAGE_NAME }}" + storagePassword: "${{ secrets.BUNNY_STORAGE_PASSWORD }}" + accessKey: "${{ secrets.BUNNY_STORAGE_KEY }}" + pullZoneId: "${{ secrets.BUNNY_ZONE_ID }}" + upload: "true" + remove: "true" + purgePullZone: "true" \ No newline at end of file