Update getDatafromContentful.yml

This commit is contained in:
赵璟 2023-06-08 17:09:52 +08:00 committed by GitHub
parent 3887fa3055
commit 15307304cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,18 +13,20 @@ jobs:
uses: octokit/graphql-action@v2.2.24 uses: octokit/graphql-action@v2.2.24
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONTENTFUL_URL: https://graphql.contentful.com/content/v1/spaces/ffrhttfighww/environments/master
CONTENTFUL_TOKEN: ${{ secrets.CONTENTFUL_TOKEN }}
with: with:
query: | query: |
query($locale: String){ query($locale: String) {
catalog(id: "2Yp0TY3kBHgG6VDjsHZNpK",locale:$locale) { catalog(id: "2Yp0TY3kBHgG6VDjsHZNpK", locale: $locale) {
linkedFrom(allowedLocales:["en-US"]) { linkedFrom(allowedLocales: ["en-US"]) {
catalogCollection(limit:20) { catalogCollection(limit: 20) {
items { items {
key key
position position
title title
linkedFrom(allowedLocales:["en-US"]) { linkedFrom(allowedLocales: ["en-US"]) {
catalogCollection(limit:20) { catalogCollection(limit: 20) {
items { items {
key key
title title
@ -37,14 +39,14 @@ jobs:
} }
} }
} }
variables: | variables: |
{ {
"locale": "en-US" "locale": "en-US"
} }
url: https://graphql.contentful.com/content/v1/spaces/ffrhttfighww/environments/master
headers: | headers: |
{ {
"Authorization": "Bearer ${{secrets.CONTENTFUL_TOKEN}}" "Authorization": "Bearer $CONTENTFUL_TOKEN"
} }
result-encoding: string result-encoding: string
result-path: appmanage/static/json/catalog.json result-path: appmanage/static/json/catalog.json