Reusable GitHub Actions for synchronizing data from external sources to repositories.
Synchronizes files from Google Drive folders to your repository.
Usage:
- uses: mekanika-dev/data-sync-actions/google-drive@mainRequired Secrets:
GOOGLE_DRIVE_CREDENTIALS- Service account JSONDRIVE_DOCS_FOLDER_ID- Google Drive folder ID
Synchronizes Bill of Materials from Odoo ERP to your repository.
Usage:
- uses: mekanika-dev/data-sync-actions/odoo@mainRequired Secrets:
ODOO_URL- Odoo server URLODOO_DB- Database nameODOO_USERNAME- UsernameODOO_API_KEY- API key for authentication
Note: this script is very specific to Mekanika BoM naming and hierarchy.
Synchronizes assembly guide pages from Automad CMS via SFTP (SSH File Transfer Protocol). Downloads complete folder structures including page metadata (.txt files) and media files, while automatically excluding pages marked as private.
Usage:
# Download and run the sync script directly
- name: Install dependencies
run: pip install paramiko
- name: Download sync script
run: |
curl -o sync-automad.py \
https://raw.githubusercontent.com/mekanika-dev/data-sync-actions/main/automad/sync-automad-sftp.py
- name: Run Automad sync
env:
AUTOMAD_HOST: ${{ secrets.AUTOMAD_HOST }}
AUTOMAD_USER: ${{ secrets.AUTOMAD_USER }}
AUTOMAD_PASSWORD: ${{ secrets.AUTOMAD_PASSWORD }} # or AUTOMAD_SSH_KEY
AUTOMAD_SSH_KEY: ${{ secrets.AUTOMAD_SSH_KEY }}
AUTOMAD_PORT: ${{ secrets.AUTOMAD_PORT }}
AUTOMAD_MAX_FILE_SIZE: ${{ secrets.AUTOMAD_MAX_FILE_SIZE }} # optional (bytes)
REMOTE_PATH: "/var/www/html/automad-master/pages/assembly"
TARGET_PATH: "assembly"
run: python sync-automad.pyRequired Secrets:
AUTOMAD_HOST- SFTP server hostname or IPAUTOMAD_USER- SSH usernameAUTOMAD_PASSWORDorAUTOMAD_SSH_KEY- SSH password or private keyAUTOMAD_PORT- SSH port (typically 22, optional)AUTOMAD_MAX_FILE_SIZE- Optional max file size in bytes (defaults to ~100 MB)
Features:
- Uses SFTP (secure SSH transport)
- Preserves complete folder/subfolder structure
- Skips pages marked with
private: onin metadata - Automatically skips files larger than GitHub's 100 MB limit
- Removes local files/folders that no longer exist on Automad
- Uses MD5 checksums to avoid re-downloading unchanged files
- Tracks sync state in
.sync-metadata.json