diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 0000000..08173a8 --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,30 @@ +name: sync + +on: + schedule: + - cron: '1,31 * * * *' # twice an hour + workflow_dispatch: + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pyyaml requests + + - name: Run sync script + env: + GUIDEBOOK_API_TOKEN: ${{ secrets.GUIDEBOOK_API_TOKEN }} + GUIDEBOOK_JWT_TOKEN: ${{ secrets.GUIDEBOOK_JWT_TOKEN }} + run: | + python ./guidebook_sync/sync_guidebook.py