File tree 2 files changed +20
-7
lines changed
2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 3
3
push :
4
4
branches : [main]
5
5
6
+ permissions :
7
+ contents : write
8
+
6
9
jobs :
7
10
build :
8
11
name : Build docs
21
24
git config --global user.name "sinedied"
22
25
git config --global user.email "[email protected] "
23
26
./scripts/repo/build-docs.sh
24
- env :
25
- GH_TOKEN : ${{ secrets.GH_TOKEN }}
Original file line number Diff line number Diff line change @@ -9,8 +9,10 @@ cd "$(dirname "${BASH_SOURCE[0]}")/../.."
9
9
10
10
DOCS_HOME=/tmp/azure-openai-rag-workshop-docs
11
11
GH_USER=$( git config user.name)
12
- REPO=https://$GH_USER :$GH_TOKEN @github.com/Azure-Samples/azure-openai-rag-workshop.git
12
+ REPO=$( git remote get-url origin)
13
+ BASE=$( pwd)
13
14
15
+ echo " Target repository: $REPO "
14
16
echo " Preparing all workshop docs..."
15
17
echo " (temp folder: $DOCS_HOME )"
16
18
rm -rf " $DOCS_HOME "
@@ -30,13 +32,23 @@ if [[ ${1-} == "--local" ]]; then
30
32
open " $DOCS_HOME "
31
33
else
32
34
# Update git repo
33
- git init
34
- git checkout -b docs
35
- git remote add origin " $REPO "
35
+ cd " $BASE "
36
+ git fetch --depth=1
37
+ git checkout docs --
38
+ echo " Switched to branch: $( git branch --show-current) "
39
+ git rm -r ' *'
40
+ cp -R " $DOCS_HOME " /* .
36
41
git add .
37
- git commit -m " docs: prepare workshop docs"
42
+ git commit --amend - m " docs: prepare workshop docs"
38
43
git push -u origin docs --force
39
44
45
+ # git init
46
+ # git checkout -b docs
47
+ # git remote add origin "$REPO"
48
+ # git add .
49
+ # git commit -m "docs: prepare workshop docs"
50
+ # git push -u origin docs --force
51
+
40
52
rm -rf " $DOCS_HOME "
41
53
fi
42
54
You can’t perform that action at this time.
0 commit comments