Skip to content

Commit

Permalink
Separate production and staging sync actions
Browse files Browse the repository at this point in the history
  • Loading branch information
stormy committed Sep 1, 2023
1 parent 2a56d9f commit 6866272
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Shopify Data Export
name: Staging Catalog Sync

on:
# schedule:
Expand All @@ -8,33 +8,6 @@ on:
jobs:
update-all-records-staging:

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: "."

update-all-records-production:

runs-on: ubuntu-latest
environment: production

Expand All @@ -58,4 +31,4 @@ jobs:
BR_ACCOUNT_ID: ${{ vars.BR_ACCOUNT_ID }}
BR_CATALOG_NAME: ${{ vars.BR_CATALOG_NAME }}
BR_API_TOKEN: ${{ secrets.BR_API_TOKEN }}
BR_OUTPUT_DIR: "."
BR_OUTPUT_DIR: "."
34 changes: 34 additions & 0 deletions .github/workflows/staging-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Staging Catalog Sync

on:
# schedule:
# - cron: '30 5,17 * * *'
workflow_dispatch:

jobs:
update-all-records-staging:

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: "."

0 comments on commit 6866272

Please sign in to comment.