Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
icmoldovan committed May 23, 2024
1 parent 8fbf2b8 commit b13637b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
3 changes: 2 additions & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ Find more of our code samples on [GitHub](https://github.com/RWS/trados-studio-a

## <Var:ProductName> API versions

### [<Var:ProductName> 2022 - API 17.1](http://developers.rws.com/studio-api-docs/17.1/index.html)
### [<Var:ProductName> 2024 - API 18.0](http://developers.rws.com/studio-api-docs/index.html)

### [<Var:ProductName> 2022 - API 17.1](http://developers.rws.com/studio-api-docs/17.1/index.html)

### [<Var:ProductName> 2022 - API 17.0](http://developers.rws.com/studio-api-docs/17.0/index.html)

Expand Down
15 changes: 5 additions & 10 deletions releaseDocs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $remote_repo="https://github-actions:${TOKEN}@github.com/sdl/studio-api-docs.git

write-host "Cloning the repo $remote_repo with the gh-pages branch"
git clone $remote_repo --branch gh-pages $TEMP_REPO_DIR
Set-Location $TEMP_REPO_DIR
cd $TEMP_REPO_DIR

#delete gh-pages_temp branch if already exist
$checkBranch = git show-ref origin/gh-pages_temp
Expand All @@ -24,20 +24,15 @@ if($checkBranch){
}

git checkout -b gh-pages_temp
$items = Get-ChildItem
foreach ($item in $items){
if (($item.Name -ne "15.2") -and ($item.Name -ne "16.1") -and ($item.Name -ne "16.2") -and ($item.Name -ne "17.0") -and ($item.Name -ne "17.1")){
git rm $item -r
}
}
git rm ".\17.2\*" -r
mkdir "17.2"
write-host "Copy documentation into the repo"

Copy-Item "$SOURCE_DIR\_site\*" .\ -Recurse -force
Copy-Item "$SOURCE_DIR\_site\17.2\*" .\17.2\ -Recurse -force

write-host "Push the new docs to the remote branch"
git config --local user.email "github-actions[bot]@users.noreply.sdl.com"
git config --local user.name "github-actions[bot]"
git add .\ -A
git add .\17.2 -A
git commit -m "Update generated documentation"
git push "$remote_repo" HEAD:gh-pages_temp
Write-Output (${TOKEN}) | gh auth login --with-token
Expand Down

0 comments on commit b13637b

Please sign in to comment.