Skip to content

Publish content to web server, GitHub is not a CDN #1

Publish content to web server, GitHub is not a CDN

Publish content to web server, GitHub is not a CDN #1

Workflow file for this run

---
name: Publish content
on:
pull_request: ~
push:
branches: [ main ]
# Allow job to be triggered manually.
workflow_dispatch:
# Cancel in-progress jobs when pushing to the same branch.
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
publish-webserver:
runs-on: "ubuntu-latest"
name: Upload content to web server
steps:
- name: Acquire sources
uses: actions/checkout@v4
- name: Install Rclone
run: apt-get install --yes rclone
- name: Configure Rclone
run: |
mkdir -p ~/.config/rclone
cat << EOF > ~/.config/rclone/rclone.conf
[cratedb-datasets]
type = webdav
url = https://cdn.crate.io/downloads/datasets/cratedb-datasets
vendor = other
EOF
- name: Upload content
env:
RCLONE_WEBDAV_USER: webdav
RCLONE_WEBDAV_PASS: ${{ secrets.RCLONE_WEBDAV_PASS }}
run: |
rclone sync ${GITHUB_WORKSPACE} cratedb-datasets:/ \
--copy-links --delete-excluded --exclude="/.git**"