Skip to content

Commit 1db0886

Browse files
committed
debug
1 parent a2de9d9 commit 1db0886

3 files changed

Lines changed: 48 additions & 45 deletions

File tree

.github/workflows/build-docs.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build Docs
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build:
8+
runs-on: windows-latest
9+
10+
env:
11+
ProductName: 'Trados Studio'
12+
ProductNameWithEdition: 'Trados Studio 2026 Release'
13+
ProductVersion: Studio19
14+
VersionNumber: 19
15+
VisualStudioEdition: 'Microsoft Visual Studio 2022'
16+
PluginPackedPath : '%AppData%\Trados\Trados Studio\19\Plugins\Packages\'
17+
PluginUnpackedPath: '%AppData%\Trados\Trados Studio\19\Plugins\Unpacked\'
18+
InstallationFolder: 'C:\Program Files (x86)\Trados\Trados Studio\Studio19'
19+
DefaultProjectsFolder: 'C:\Users\UserName\Documents\Studio 2026 Release\Projects'
20+
StudioDocumentsFolderName: 'Studio 2026 Release'
21+
AppSigningEmail : app-signing@sdl.com
22+
ServerProductName: Trados GroupShare
23+
ServerProductNameWithVersion: Trados GroupShare 2020 SR1
24+
DotNetVersion: '.Net Framework 4.8'
25+
26+
steps:
27+
- uses: actions/checkout@v2
28+
29+
- name: install docfx
30+
run: |
31+
dotnet tool install -g docfx
32+
33+
- name: build _site
34+
run: docfx.exe build docfx.json
35+
36+
- shell: pwsh
37+
run: |
38+
.\releaseDocs.ps1 "$GITHUB_ACTOR" "${{ secrets.GITHUB_TOKEN }}"
39+
if: github.event_name != 'pull_request'

.github/workflows/release.yml

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -13,45 +13,6 @@ on:
1313
# Allows you to run this workflow manually from the Actions tab
1414
workflow_dispatch:
1515

16-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1716
jobs:
18-
# This workflow contains a single job called "build"
1917
build:
20-
# The type of runner that the job will run on
21-
runs-on: windows-latest
22-
23-
env:
24-
ProductName: 'Trados Studio'
25-
ProductNameWithEdition: 'Trados Studio 2026 Release'
26-
ProductVersion: Studio19
27-
VersionNumber: 19
28-
VisualStudioEdition: 'Microsoft Visual Studio 2022'
29-
PluginPackedPath : '%AppData%\Trados\Trados Studio\19\Plugins\Packages\'
30-
PluginUnpackedPath: '%AppData%\Trados\Trados Studio\19\Plugins\Unpacked\'
31-
InstallationFolder: 'C:\Program Files (x86)\Trados\Trados Studio\Studio19'
32-
DefaultProjectsFolder: 'C:\Users\UserName\Documents\Studio 2026 Release\Projects'
33-
StudioDocumentsFolderName: 'Studio 2026 Release'
34-
AppSigningEmail : app-signing@sdl.com
35-
ServerProductName: Trados GroupShare
36-
ServerProductNameWithVersion: Trados GroupShare 2020 SR1
37-
DotNetVersion: '.Net Framework 4.8'
38-
# Steps represent a sequence of tasks that will be executed as part of the job
39-
steps:
40-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
41-
- uses: actions/checkout@v2
42-
43-
# Runs a single command using the runners shell
44-
- name: install docfx
45-
run: |
46-
dotnet tool install -g docfx
47-
48-
- name: build _site
49-
run: docfx.exe build docfx.json
50-
51-
# Runs a set of commands using the runners shell
52-
#- name: commit to gh-pages
53-
# run: bash releaseDocs.sh $GITHUB_ACTOR ${{ secrets.GITHUB_TOKEN }}
54-
- shell: pwsh
55-
run: |
56-
.\releaseDocs.ps1 "$GITHUB_ACTOR" "${{ secrets.GITHUB_TOKEN }}"
57-
if: github.event_name != 'pull_request'
18+
uses: ./.github/workflows/build-docs.yml

.github/workflows/update-public-api-documentation.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ on:
2727

2828
jobs:
2929
SynchApiDocsFromSource:
30-
30+
name: "Update api docs from product binaries"
3131
runs-on: windows-latest
3232
env:
3333
PROJECT_NAME: TradosStudio
@@ -41,7 +41,7 @@ jobs:
4141
env:
4242
AZURE_DEVOPS_TOKEN: ${{ secrets.AZURE_DEVOPS_TOKEN }}
4343
run: |
44-
$binPath = "${{ github.workspace }}..\..\Code\Bin\Mixed Platforms\Debug"
44+
$binPath = [System.IO.Path]::GetFullPath("${{ github.workspace }}..\..\Code\Bin\Mixed Platforms\Debug")
4545
New-Item -ItemType Directory -Force -Path $binPath | Out-Null
4646
4747
$orgUrl = "https://dev.azure.com/sdl"
@@ -50,6 +50,8 @@ jobs:
5050
$branchName = "refs/heads/${{ inputs.projectBranch }}"
5151
$artifactName = "binaries"
5252
53+
write-host "Fetching latest build artifacts for pipeline ID $env:PIPELINE_ID on branch $branchName to populate $binPath"
54+
5355
$headers = @{
5456
Authorization = "Basic " + [Convert]::ToBase64String(
5557
[Text.Encoding]::ASCII.GetBytes(":$env:AZURE_DEVOPS_TOKEN"))
@@ -79,11 +81,11 @@ jobs:
7981
$downloadUrl = $artifact.resource.downloadUrl
8082
Write-Host "Downloading artifact from: $downloadUrl"
8183
82-
$zipPath = "${{ github.workspace }}\binaries.zip"
84+
$zipPath = "${{ RUNNER.TEMP }}\binaries.zip"
8385
Invoke-WebRequest -Uri $downloadUrl -Headers $headers -OutFile $zipPath
8486
8587
# Extract and copy to target bin path
86-
$extractDir = "${{ github.workspace }}\binaries_extracted"
88+
$extractDir = "${{ RUNNER.TEMP }}\binaries_extracted"
8789
Expand-Archive -Path $zipPath -DestinationPath $extractDir -Force
8890
# ADO container artifacts unzip into a subfolder named after the artifact
8991
$innerDir = Join-Path $extractDir $artifactName
@@ -198,12 +200,13 @@ jobs:
198200
Copy-Item -Path $metadataPath -Destination .\source-version-metadata.json -Force
199201
}
200202
201-
write-host "committing and pushing changes to $featureBranch"
203+
write-host "staging changes for commit"
202204
git add .\api\*.*
203205
if (Test-Path .\source-version-metadata.json) {
204206
git add .\source-version-metadata.json
205207
}
206208
209+
write-host "committing and pushing changes to $featureBranch"
207210
git commit -a -m "update api doc"
208211
git push $repoURL
209212

0 commit comments

Comments
 (0)