Skip to content

About

Un ensemble d'actions GitHub réutilisables pour synchroniser nos données depuis n'importe quelle source externe

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Sync Actions

Reusable GitHub Actions for synchronizing data from external sources to repositories.

Available Actions

Google Drive Sync

Synchronizes files from Google Drive folders to your repository.

Usage:

- uses: mekanika-dev/data-sync-actions/google-drive@main

Required Secrets:

  • GOOGLE_DRIVE_CREDENTIALS - Service account JSON
  • DRIVE_DOCS_FOLDER_ID - Google Drive folder ID

Odoo BOM Sync

Synchronizes Bill of Materials from Odoo ERP to your repository.

Usage:

- uses: mekanika-dev/data-sync-actions/odoo@main

Required Secrets:

  • ODOO_URL - Odoo server URL
  • ODOO_DB - Database name
  • ODOO_USERNAME - Username
  • ODOO_API_KEY - API key for authentication

Note: this script is very specific to Mekanika BoM naming and hierarchy.

Automad Assembly Sync

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.py

Required Secrets:

  • AUTOMAD_HOST - SFTP server hostname or IP
  • AUTOMAD_USER - SSH username
  • AUTOMAD_PASSWORD or AUTOMAD_SSH_KEY - SSH password or private key
  • AUTOMAD_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: on in 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

About

Un ensemble d'actions GitHub réutilisables pour synchroniser nos données depuis n'importe quelle source externe

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages