diff --git a/.github/workflows/docs-manual.yaml b/.github/workflows/docs-manual.yaml deleted file mode 100644 index 207ab82511..0000000000 --- a/.github/workflows/docs-manual.yaml +++ /dev/null @@ -1,46 +0,0 @@ -name: "Docs / Publish docs.scylladb.com/manual" - -env: - FLAG: 'manual' - -on: - schedule: - # Run daily at 00:00 UTC - - cron: '0 0 * * *' - workflow_dispatch: - -jobs: - release: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ github.event.repository.default_branch }} - persist-credentials: false - fetch-depth: 0 - submodules: true - - - name: Fetch submodules latest version - run: | - git submodule sync - git submodule update --init --remote - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - name: Set up env - run: make -C submodules/scylladb/docs FLAG="${{ env.FLAG }}" setupenv - - - name: Build docs - run: make -C submodules/scylladb/docs FLAG="${{ env.FLAG }}" multiversion - - - name: Build redirects - run: make -C submodules/scylladb/docs FLAG="${{ env.FLAG }}" redirects - - - name: Deploy docs to GitHub Pages - run: ./scripts/deploy_manual.sh - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/docs-pages.yaml b/.github/workflows/docs-pages.yaml index 1a05afd4fc..902b01e980 100644 --- a/.github/workflows/docs-pages.yaml +++ b/.github/workflows/docs-pages.yaml @@ -1,4 +1,4 @@ -name: "Docs / Publish docs.scylladb.com" +name: "Docs / Publish" # For more information, # see https://sphinx-theme.scylladb.com/stable/deployment/production.html#available-workflows @@ -6,6 +6,7 @@ on: push: branches: - main + - 'branch-**' paths: - "docs/**" workflow_dispatch: @@ -31,6 +32,6 @@ jobs: - name: Build redirects run: make -C docs redirects - name: Deploy docs to GitHub Pages - run: ./scripts/deploy_pages.sh + run: ./docs/_utils/deploy.sh env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 9f7d567d20..0000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "submodules/scylladb"] - path = submodules/scylladb - url = https://github.com/scylladb/scylladb.git diff --git a/docs/_utils/deploy.sh b/docs/_utils/deploy.sh new file mode 100755 index 0000000000..d0aa23fb05 --- /dev/null +++ b/docs/_utils/deploy.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +# Copy contents +mkdir gh-pages +cp -r ./docs/_build/dirhtml/. gh-pages + +# Create gh-pages branch +cd gh-pages +git init +git config --local user.email "action@scylladb.com" +git config --local user.name "GitHub Action" +git remote add origin "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" +git checkout -b gh-pages + +# Deploy +git add . +git commit -m "Publish docs" || true +git push origin gh-pages --force \ No newline at end of file diff --git a/scripts/deploy_manual.sh b/scripts/deploy_manual.sh deleted file mode 100755 index ad27459e96..0000000000 --- a/scripts/deploy_manual.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env bash - -# Variables -REPO_URL="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" -GH_PAGES_DIR="gh-pages" - -echo "Preparing docs dir..." -mkdir -p $GH_PAGES_DIR -cp -r ./submodules/scylladb/docs/_build/dirhtml/. $GH_PAGES_DIR - -if git ls-remote --heads "$REPO_URL" gh-pages; then - echo "Cloning existing gh-pages branch..." - git clone --branch gh-pages --single-branch "$REPO_URL" "${GH_PAGES_DIR}-existing" - cd "${GH_PAGES_DIR}-existing" - - echo "Cleaning up existing content..." - rm -rf manual - - echo "Copying new documentation..." - mkdir -p manual - cp -r ../$GH_PAGES_DIR/* manual/ - - echo "Configuring Git..." - git config --local user.email "action@scylladb.com" - git config --local user.name "GitHub Action" - - echo "Committing and pushing changes..." - git add . - git commit -m "Update docs" || true - git push origin gh-pages --force - -else - echo "Error: The gh-pages branch does not exist in the repository." - echo "Please create a gh-pages branch in your repository and re-run the script." - exit 1 -fi diff --git a/scripts/deploy_pages.sh b/scripts/deploy_pages.sh deleted file mode 100755 index 277cc4e6e3..0000000000 --- a/scripts/deploy_pages.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash - -# Variables -REPO_URL="https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" -GH_PAGES_DIR="gh-pages" - -echo "Preparing docs dir..." -mkdir -p $GH_PAGES_DIR -cp -r ./docs/_build/dirhtml/. $GH_PAGES_DIR - -if git ls-remote --heads "$REPO_URL" gh-pages; then - echo "Cloning existing gh-pages branch..." - git clone --branch gh-pages --single-branch "$REPO_URL" "${GH_PAGES_DIR}-existing" - cd "${GH_PAGES_DIR}-existing" - - echo "Cleaning up existing content..." - find . -mindepth 1 -not -path './.git*' -not -path './manual*' -exec rm -rf {} + - - echo "Copying new documentation..." - cp -r ../$GH_PAGES_DIR/* . - - echo "Configuring Git..." - git config --local user.email "action@scylladb.com" - git config --local user.name "GitHub Action" - - echo "Committing and pushing changes..." - git add . - git commit -m "Update docs" || true - git push origin gh-pages --force -else - echo "Error: The gh-pages branch does not exist in the repository." - echo "Please create a gh-pages branch in your repository and re-run the script." - exit 1 -fi diff --git a/submodules/scylladb b/submodules/scylladb deleted file mode 160000 index 4260f3f55a..0000000000 --- a/submodules/scylladb +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4260f3f55a00e7ff1d3d7f387ebc62921abb38b7