preview: deploy to bunny

This commit is contained in:
John Bowdre 2024-06-06 18:05:16 -05:00
parent 7014e8d7bb
commit 33c80f1280

View file

@ -1,4 +1,4 @@
name: Deploy Preview to Neocities name: Deploy Preview to Bunny
# only run on changes to preview # only run on changes to preview
on: on:
@ -42,16 +42,19 @@ jobs:
chmod 644 ~/.ssh/known_hosts chmod 644 ~/.ssh/known_hosts
- name: Build with Hugo - name: Build with Hugo
run: HUGO_REMOTE_FONT_PATH=${{ secrets.REMOTE_FONT_PATH }} hugo --minify --environment preview 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 - name: Highlight with Torchlight
run: | run: |
npm i @torchlight-api/torchlight-cli npm i @torchlight-api/torchlight-cli
npx torchlight npx torchlight
- name: Deploy to Neocities - name: Deploy to Bunny
uses: bcomnes/deploy-to-neocities@v1 uses: ayeressian/bunnycdn-storage-deploy@v2.2.2
with: with:
api_token: ${{ secrets.NEOCITIES_PREVIEW_API_TOKEN }} source: public
cleanup: true destination: /
dist_dir: public 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"