English | 中文
A GitHub Action that packages your repository contents and uploads them to a WebDAV server. Supports uploading to multiple destination paths simultaneously.
- 📦 Automatically packages repository contents into a compressed tar.gz archive
- ☁️ Uploads to WebDAV servers with authentication
- 📁 Supports multiple destination paths in a single action run
| Input | Required | Description |
|---|---|---|
webdav_url |
✅ | WebDAV server URL (e.g., https://example.com/webdav/) |
username |
✅ | WebDAV server username |
password |
✅ | WebDAV server password |
destination_paths |
❌ | Comma-separated list of destination paths on WebDAV server (default: /) |
- name: Upload to WebDAV
uses: JavanShen/webdav-upload-action@v1
with:
webdav_url: ${{ secrets.WEBDAV_URL }}
username: ${{ secrets.WEBDAV_USERNAME }}
password: ${{ secrets.WEBDAV_PASSWORD }}- name: Upload to multiple WebDAV paths
uses: JavanShen/webdav-upload-action@v1
with:
webdav_url: ${{ secrets.WEBDAV_URL }}
username: ${{ secrets.WEBDAV_USERNAME }}
password: ${{ secrets.WEBDAV_PASSWORD }}
destination_paths: '/backup,/archive,/releases'- name: Upload with custom name and timestamp
uses: JavanShen/webdav-upload-action@v1
with:
webdav_url: ${{ secrets.WEBDAV_URL }}
username: ${{ secrets.WEBDAV_USERNAME }}
password: ${{ secrets.WEBDAV_PASSWORD }}
archive_name: 'my-project-backup'
include_timestamp: 'true'Ensure your WebDAV server supports:
- Basic authentication
- File upload operations
- Directory creation (optional, action will attempt to create directories)
Add the following secrets to your repository (Settings → Secrets and variables → Actions):
WEBDAV_URL: Your WebDAV server URLWEBDAV_USERNAME: WebDAV server usernameWEBDAV_PASSWORD: WebDAV server password
Reference this action in your .github/workflows/*.yml file as shown in the examples above.
The action creates a archive.tar.gz file containing your repository contents, excluding:
archive.tar.gz(the output file itself)node_modules/directory.git/directorydist/directory.github/directory
After successful upload, your WebDAV server will contain:
/your-path/
└── [archive_name].tar.gz (compressed repository contents)
The filename will be [archive_name].tar.gz if archive_name is specified, or archive_YYYYMMDD_HHMMSS.tar.gz if include_timestamp is enabled.
For multiple paths, the same archive will be uploaded to each specified location.