mirror of
https://github.com/Dictionarry-Hub/database.git
synced 2025-12-11 16:26:58 +00:00
* feat. Script and workflow to sync to atlas instance on merge into prod * del. Removed legacy restore / backup scripts
27 lines
497 B
YAML
27 lines
497 B
YAML
name: Sync to MongoDB
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- prod
|
|
|
|
jobs:
|
|
sync:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.x'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install pymongo[srv]
|
|
|
|
- name: Run sync script
|
|
env:
|
|
MONGODB_URI: ${{ secrets.MONGODB_URI }}
|
|
run: python scripts/sync.py |