File tree Expand file tree Collapse file tree 3 files changed +16
-10
lines changed Expand file tree Collapse file tree 3 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 24
24
uses : actions/checkout@v4
25
25
26
26
- name : Install azd
27
- uses : Azure/setup-azd@v1.0.0
27
+ uses : Azure/setup-azd@v2
28
28
29
29
- name : Log in with Azure (Federated Credentials)
30
30
if : ${{ env.AZURE_CLIENT_ID != '' }}
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
docs :
8
11
name : Build docs
18
21
run : npm i -g @moaw/cli
19
22
- name : Build and update docs
20
23
run : |
21
- git config --global user.name "sinedied "
22
- git config --global user.email "[email protected] "
24
+ git config --global user.name "SandraAhlgrimm "
25
+ git config --global user.email "[email protected] "
23
26
./scripts/repo/build-docs.sh
24
- env :
25
- GH_TOKEN : ${{ secrets.GH_TOKEN }}
27
+
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-java-docs
11
11
GH_USER=$( git config user.name)
12
- REPO=https://$GH_USER :$GH_TOKEN @github.com/Azure-Samples/azure-openai-rag-workshop-java.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 "
@@ -29,11 +31,13 @@ if [[ ${1-} == "--local" ]]; then
29
31
open " $DOCS_HOME "
30
32
else
31
33
# Update git repo
32
- git init
33
- git checkout -b docs
34
- git remote add origin " $REPO "
34
+ cd " $BASE "
35
+ git fetch --depth=1
36
+ git checkout docs --
37
+ git rm -r ' *'
38
+ cp -R " $DOCS_HOME " /docs/* .
35
39
git add .
36
- git commit -m " docs: prepare workshop docs"
40
+ git commit -a - m " docs: prepare workshop docs"
37
41
git push -u origin docs --force
38
42
39
43
rm -rf " $DOCS_HOME "
You can’t perform that action at this time.
0 commit comments