Skip to content

feat: fulfill insights #23

feat: fulfill insights

feat: fulfill insights #23

name: "Upload Inisghts JSON file to Azure Blob Storage"
on:
push:
branches:
- main
permissions:
id-token: write
contents: read
jobs:
build-and-upload-insights:
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: 'insights' # The directory containing the .mdx files
output-file: 'insights-main' # The name of the generated JSON file without extension
specify-content: 'false'
script-path: ${{ github.workspace }}/.github/workflows/scripts
- name: Verifty json
run: cat insights-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 insights-main.json \
--name insights-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/insights-main.json"