publishDocs.ps1 508 Bytes
Newer Older
Benedikt Heinrichs's avatar
Benedikt Heinrichs committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
param(
    $token
)

$remoteUrl = git config --get remote.origin.url
$remoteUrl = $remoteUrl.replace("git@", "")
$remoteUrl = $remoteUrl -replace "https(.*?)@",""
$remoteUrl = $remoteUrl.replace(":", "/")
$remoteUrl = $remoteUrl.replace(".git", ".wiki.git")

$temporaryFolderName = "publishDocsTempFolder"

git clone "https://gitlab-ci-token:$($token)@$($remoteUrl)" $temporaryFolderName
cd $temporaryFolderName
Remove-Item *
cp -r ../docs/* ./
git add . 
git commit -m "Docs: Documentation Update" 
git push