Skip to content

Remove slash in destination #10

Remove slash in destination

Remove slash in destination #10

Workflow file for this run

name: Deploy to BunnyCDN
on:
push:
branches: ["main"]
workflow_dispatch:
concurrency:
group: "bunnycdn"
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Hugo
run: |
LATEST_HUGO_VERSION=$(grep github.com/gohugoio/hugo go.mod | awk '{print $NF}' | sed 's/^v//')
HUGO_DOWNLOAD_URL="https://github.com/gohugoio/hugo/releases/download/v${LATEST_HUGO_VERSION}/hugo_extended_${LATEST_HUGO_VERSION}_linux-amd64.tar.gz"
curl -sL --retry 5 "$HUGO_DOWNLOAD_URL" | tar xvzf - hugo
./hugo version
- name: Build with Hugo
env:
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: ./hugo --minify --gc
- name: Fix RSS feed
run: |
pushd public
mkdir -vp feed
cp index.xml feed/index.xml
cp index.xml feed/index.html
- name: Deploy to BunnyCDN
uses: ayeressian/bunnycdn-storage-deploy@v2.2.1
with:
source: "public"
destination: ""
storageZoneName: "major-io"
storagePassword: "${{ secrets.BUNNY_FTP_PASSWORD }}"
accessKey: "${{ secrets.BUNNY_API_KEY }}"
pullZoneId: "${{ secrets.BUNNY_PULL_ZONE }}"
upload: "true"
remove: "true"
purgePullZone: "true"