Skip to content

Commit

Permalink
sync contentful
Browse files Browse the repository at this point in the history
  • Loading branch information
qiaofeng1227 committed Dec 5, 2023
1 parent 323a5be commit 242da1d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/sync_contentful.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ jobs:
fi
echo "APP_LISTS=$appnames" >> $GITHUB_OUTPUT
- name: get appList on push
id: get_applist
- name: get appList on workflow_dispatch
id: get_applist_workflow
if: github.event_name == 'workflow_dispatch'
run: |
appnames=$(find ./apps -mindepth 1 -maxdepth 1 -type d -exec basename {} \;)
Expand All @@ -58,7 +58,15 @@ jobs:
pip install requests contentful_management
- name: Run inline Python script to sync data to Contentful
if: github.event_name != 'workflow_dispatch'
env:
CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_TOKEN }}
APP_LISTS: ${{ steps.get_applist.outputs.APP_LISTS }}
APP_LISTS: ${{ steps.get_applist.outputs.APP_LISTS }}
run: python ./build/sync_contentful.py

- name: Run inline Python script to sync data to Contentful
if: github.event_name == 'workflow_dispatch'
env:
CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_TOKEN }}
APP_LISTS: ${{ steps.get_applist_workflow.outputs.APP_LISTS }}
run: python ./build/sync_contentful.py

0 comments on commit 242da1d

Please sign in to comment.