Feature/Atlas Integration (#4)
* feat. Script and workflow to sync to atlas instance on merge into prod * del. Removed legacy restore / backup scripts
This commit is contained in:
parent
d5090d1a9f
commit
37f53043db
4 changed files with 170 additions and 66 deletions
27
.github/workflows/sync.yml
vendored
Normal file
27
.github/workflows/sync.yml
vendored
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue