Update index.mdx #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Upload FAQ JSON file to Azure Blob Storage" | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build-and-upload-faqs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Build JSON from MD files | |
uses: ./.github/workflows/actions/build-index | |
with: | |
dir-name: 'faqs' # The directory containing the .mdx files | |
output-file: 'faqs-main' # The name of the generated JSON file without extension | |
specify-content: 'true' | |
script-path: ${{ github.workspace }}/.github/workflows/scripts | |
- name: Verifty json | |
run: cat faqs-main.json | |
- name: Azure Login | |
uses: Azure/[email protected] | |
with: | |
client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
- name: Upload JSON to Azure Blob Storage | |
run: | | |
az storage blob upload \ | |
--account-name prodfinddata \ | |
--container-name find-content \ | |
--file faqs-main.json \ | |
--name faqs-main.json \ | |
--overwrite \ | |
--only-show-errors | |
- name: Set Container to Allow Public Access to Blobs | |
run: | | |
az storage container set-permission \ | |
--account-name prodfinddata \ | |
--name find-content \ | |
--public-access blob | |
# Step 5: Display the URL of the Uploaded Blob | |
- name: Display Blob URL | |
run: | | |
echo "Uploaded Blob URL:" | |
echo "https://prodfinddata.blob.core.windows.net/find-content/faqs-main.json" |