Skip to content

Commit b91fb58

Browse files
authored
docs: update README additional info (#665)
* docs: update README additional info * chore(ci): update checkout version * chore(ci): update gitlab auth
1 parent 59f2c6f commit b91fb58

File tree

2 files changed

+32
-17
lines changed

2 files changed

+32
-17
lines changed

.github/workflows/mkdocs.yaml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
deploy:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v2
18-
- uses: actions/setup-python@v2
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-python@v4
1919
with:
2020
python-version: 3.x
2121
- run: cp proto/apidocs.swagger.json docs/reference/apidocs.json
@@ -29,19 +29,39 @@ jobs:
2929
update-docs:
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout@v2
32+
- uses: actions/checkout@v4
3333
with:
3434
fetch-depth: 0
3535
- name: Update Gitlab Documentation
36+
env:
37+
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
38+
GITLAB_USER: ${{ secrets.GITLAB_USER }}
39+
GITLAB_EMAIL: ${{ secrets.GITLAB_EMAIL }}
40+
GITLAB_DOCS_REPO_URL: ${{ secrets.GITLAB_DOCS_REPO_URL }}
3641
run: |
37-
GL_BRANCH_NAME="documentation-ref_$GITHUB_SHA"
42+
GL_BRANCH_NAME="main"
3843
cd ..
39-
git clone ${{ secrets.GITLAB_DOC_URL }}
40-
cd docs
41-
git config user.name ${{ secrets.GITLAB_USER }}
42-
git config user.email ${{ secrets.GITLAB_EMAIL }}
43-
cp ../maestro/**/*.md .
44-
git checkout -b $GL_BRANCH_NAME
44+
45+
# Clone using service account credentials with HTTPS URL
46+
git clone "https://${GITLAB_USER}:${GITLAB_TOKEN}@${GITLAB_DOCS_REPO_URL}" gitlab-docs
47+
cd gitlab-docs
48+
49+
# Configure git with service account identity
50+
git config user.name "${GITLAB_USER}"
51+
git config user.email "${GITLAB_EMAIL}"
52+
53+
# Copy everything under docs/ directory while preserving directory structure
54+
rsync -av ../maestro/docs/ ./
55+
56+
# Check if there are any changes to commit
57+
if git diff --quiet && git diff --cached --quiet; then
58+
echo "No changes to documentation files, skipping push"
59+
exit 0
60+
fi
61+
62+
# Create branch and commit changes
4563
git add .
46-
git commit --allow-empty -m "Created by $GITHUB_ACTOR"
64+
git commit -m "Auto-update documentation from GitHub (SHA: ${GITHUB_SHA:0:7})" -m "Triggered by: $GITHUB_ACTOR"
4765
git push origin $GL_BRANCH_NAME
66+
67+
echo "Documentation updated and pushed to branch: $GL_BRANCH_NAME"

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,4 @@ Maestro provides two APIs for external and internal communication:
6666

6767
[//]: # (Here a link to the complete module documentation as well as other additional information should be added as well as contact information.)
6868

69-
Documentation can be found in the [docs folder](./docs). This module is supported by the Wildlife's multiplayer team.
70-
71-
| Position | Name |
72-
|---------------------|--------------------|
73-
| Owner Team | Multiplayer Team |
74-
| Documentation Owner | [Guilherme Carvalho](https://github.com/guilhermocc) |
69+
Documentation can be found in the [docs folder](./docs)

0 commit comments

Comments
 (0)