From 4f7f4242db736e94afeb750f5d2e3d74c2245d63 Mon Sep 17 00:00:00 2001 From: Stormy Shippy Date: Wed, 30 Aug 2023 13:58:07 +0000 Subject: [PATCH] Add github action to run export --- .github/workflows/update-records.yml | 34 ++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/update-records.yml diff --git a/.github/workflows/update-records.yml b/.github/workflows/update-records.yml new file mode 100644 index 0000000..4c23db9 --- /dev/null +++ b/.github/workflows/update-records.yml @@ -0,0 +1,34 @@ +name: Shopify Data Export + +on: + # schedule: + # - cron: '30 5,17 * * *' + workflow_dispatch: + +jobs: + update-all-records: + + runs-on: ubuntu-latest + environment: staging + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r requirements.txt + - name: Update all records + run: | + python src/main.py + env: + BR_SHOPIFY_URL: ${{ vars.BR_SHOPIFY_URL }} + BR_SHOPIFY_PAT: ${{ secrets.BR_SHOPIFY_PAT }} + BR_ENVIRONMENT_NAME: ${{ vars.BR_ENVIRONMENT_NAME }} + BR_ACCOUNT_ID: ${{ vars.BR_ACCOUNT_ID }} + BR_CATALOG_NAME: ${{ vars.BR_CATALOG_NAME }} + BR_API_TOKEN: ${{ secrets.BR_API_TOKEN }} + BR_OUTPUT_DIR: "." \ No newline at end of file