File tree 7 files changed +122
-21
lines changed
7 files changed +122
-21
lines changed Original file line number Diff line number Diff line change
1
+ name : " Docs / Publish docs.scylladb.com/manual"
2
+
3
+ env :
4
+ FLAG : ' manual'
5
+
6
+ on :
7
+ schedule :
8
+ # Run daily at 00:00 UTC
9
+ - cron : ' 0 0 * * *'
10
+ workflow_dispatch :
11
+
12
+ jobs :
13
+ release :
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - name : Checkout
17
+ uses : actions/checkout@v4
18
+ with :
19
+ ref : ${{ github.event.repository.default_branch }}
20
+ persist-credentials : false
21
+ fetch-depth : 0
22
+ submodules : true
23
+
24
+ - name : Fetch submodules latest version
25
+ run : |
26
+ git submodule sync
27
+ git submodule update --init --remote
28
+
29
+ - name : Set up Python
30
+ uses : actions/setup-python@v5
31
+ with :
32
+ python-version : ' 3.10'
33
+
34
+ - name : Set up env
35
+ run : make -C submodules/scylladb/docs FLAG="${{ env.FLAG }}" setupenv
36
+
37
+ - name : Build docs
38
+ run : make -C submodules/scylladb/docs FLAG="${{ env.FLAG }}" multiversion
39
+
40
+ - name : Build redirects
41
+ run : make -C submodules/scylladb/docs FLAG="${{ env.FLAG }}" redirects
42
+
43
+ - name : Deploy docs to GitHub Pages
44
+ run : ./scripts/deploy_manual.sh
45
+ env :
46
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1
- name : " Docs / Publish"
1
+ name : " Docs / Publish docs.scylladb.com "
2
2
# For more information,
3
3
# see https://sphinx-theme.scylladb.com/stable/deployment/production.html#available-workflows
4
4
5
5
on :
6
6
push :
7
7
branches :
8
8
- main
9
- - ' branch-**'
10
9
paths :
11
10
- " docs/**"
12
11
workflow_dispatch :
32
31
- name : Build redirects
33
32
run : make -C docs redirects
34
33
- name : Deploy docs to GitHub Pages
35
- run : ./docs/_utils/deploy .sh
34
+ run : ./scripts/deploy_pages .sh
36
35
env :
37
36
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
1
+ [submodule "submodules/scylladb "]
2
+ path = submodules/scylladb
3
+ url = https://github.com/scylladb/scylladb.git
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Variables
4
+ REPO_URL=" https://x-access-token:${GITHUB_TOKEN} @github.com/${GITHUB_REPOSITORY} .git"
5
+ GH_PAGES_DIR=" gh-pages"
6
+
7
+ echo " Preparing docs dir..."
8
+ mkdir -p $GH_PAGES_DIR
9
+ cp -r ./submodules/scylladb/docs/_build/dirhtml/. $GH_PAGES_DIR
10
+
11
+ if git ls-remote --heads " $REPO_URL " gh-pages; then
12
+ echo " Cloning existing gh-pages branch..."
13
+ git clone --branch gh-pages --single-branch " $REPO_URL " " ${GH_PAGES_DIR} -existing"
14
+ cd " ${GH_PAGES_DIR} -existing"
15
+
16
+ echo " Cleaning up existing content..."
17
+ rm -rf manual
18
+
19
+ echo " Copying new documentation..."
20
+ mkdir -p manual
21
+ cp -a ../$GH_PAGES_DIR /. manual/
22
+
23
+ echo " Configuring Git..."
24
+ git config --local user.email
" [email protected] "
25
+ git config --local user.name " GitHub Action"
26
+
27
+ echo " Committing and pushing changes..."
28
+ git add .
29
+ git commit -m " Update docs" || true
30
+ git push origin gh-pages --force
31
+
32
+ else
33
+ echo " Error: The gh-pages branch does not exist in the repository."
34
+ echo " Please create a gh-pages branch in your repository and re-run the script."
35
+ exit 1
36
+ fi
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Variables
4
+ REPO_URL=" https://x-access-token:${GITHUB_TOKEN} @github.com/${GITHUB_REPOSITORY} .git"
5
+ GH_PAGES_DIR=" gh-pages"
6
+
7
+ echo " Preparing docs dir..."
8
+ mkdir -p $GH_PAGES_DIR
9
+ cp -r ./docs/_build/dirhtml/. $GH_PAGES_DIR
10
+
11
+ if git ls-remote --heads " $REPO_URL " gh-pages; then
12
+ echo " Cloning existing gh-pages branch..."
13
+ git clone --branch gh-pages --single-branch " $REPO_URL " " ${GH_PAGES_DIR} -existing"
14
+ cd " ${GH_PAGES_DIR} -existing"
15
+
16
+ echo " Cleaning up existing content..."
17
+ find . -mindepth 1 -not -path ' ./.git*' -not -path ' ./manual*' -exec rm -rf {} +
18
+
19
+ echo " Copying new documentation..."
20
+ cp -a ../$GH_PAGES_DIR /. .
21
+
22
+ echo " Configuring Git..."
23
+ git config --local user.email
" [email protected] "
24
+ git config --local user.name " GitHub Action"
25
+
26
+ echo " Committing and pushing changes..."
27
+ git add .
28
+ git commit -m " Update docs" || true
29
+ git push origin gh-pages --force
30
+ else
31
+ echo " Error: The gh-pages branch does not exist in the repository."
32
+ echo " Please create a gh-pages branch in your repository and re-run the script."
33
+ exit 1
34
+ fi
You can’t perform that action at this time.
0 commit comments