Skip to content

Refresh Power BI documentation and localized files #26

Refresh Power BI documentation and localized files

Refresh Power BI documentation and localized files #26

Workflow file for this run

name: Refresh Power BI documentation and localized files
on: workflow_dispatch
jobs:
setup-and-process:
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Power BI Desktop
run: choco install --ignore-checksums powerbi
- name: Process cultures sequentially
run: |
$cultures = @('en', 'ca', 'cs','da','de','el','es','fi','fr','gl','hi','hu','id','it','ja','kk','ko','lt','lv','ms','nl','pl','pt-PT','pt-BR','ro','ru','sk','sl','sk-Cyrl','sr-Latn','sv','th','tr','uk','vi','zh-Hans','zh-Hant','zh-tw')
$date = Get-Date -Format "yyyyMMdd"
$branchName = "update_$date"
$hasChanges = $false
foreach ($culture in $cultures) {
# Set culture-specific environment variable
$env:PQ_UICultureOverride = $culture
# Start Power BI Desktop in the appropriate culture
$pbixPath = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "process\dox.pbix"
Start-Process "C:\Program Files\Microsoft Power BI Desktop\bin\PBIDesktop.exe" -ArgumentList $pbixPath
Start-Sleep -Seconds 60
# Get the msmdsrv.exe port
$msmdsrvPorts = Get-Process -Name msmdsrv -ErrorAction SilentlyContinue | ForEach-Object {
Get-NetTCPConnection -OwningProcess $_.Id | Select-Object LocalPort -Unique
}
if ($msmdsrvPorts) {
# Process the database on the instance for the current culture
$port = $msmdsrvPorts[0].LocalPort
$outputJsonFile = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "process\shared\${culture}.json"
pwsh -File ./.github/scripts/generate-doc-output.ps1 -port $port -outputJsonFile $outputJsonFile
} else {
Write-Host "No msmdsrv.exe process found."
}
# Close Power BI Desktop
Stop-Process -Name PBIDesktop -Force -ErrorAction SilentlyContinue
Write-Host "Power BI Desktop closed for culture $culture."
}
- name: Commit and push changes
uses: EndBug/add-and-commit@v9
with:
new_branch: docs-update
message: "Update localized docs"