This is an automated email from the ASF dual-hosted git repository.
davidarthur pushed a commit to branch markdown
in repository https://gitbox.apache.org/repos/asf/kafka-site.git
The following commit(s) were added to refs/heads/markdown by this push:
new b1b06d711 second half
b1b06d711 is described below
commit b1b06d71127fabe394de53d3552e0d273f0ce7c5
Author: David Arthur <[email protected]>
AuthorDate: Mon Oct 27 17:31:05 2025 -0500
second half
---
.github/workflows/build-and-deploy.yml | 68 ++++++++++++----------------------
1 file changed, 23 insertions(+), 45 deletions(-)
diff --git a/.github/workflows/build-and-deploy.yml
b/.github/workflows/build-and-deploy.yml
index 2a08c7da2..0256bd0ab 100644
--- a/.github/workflows/build-and-deploy.yml
+++ b/.github/workflows/build-and-deploy.yml
@@ -44,59 +44,37 @@ jobs:
path: output
compression-level: 9
if-no-files-found: error
+ retention-days: 7
deploy-to-staging:
runs-on: ubuntu-latest
needs: build-html
steps:
- - name: Configure Git
- run: |
- git config --global user.name "GitHub Actions"
- git config --global user.email "[email protected]"
-
- - name: Create or checkout asf-staging branch
+ - name: Checkout staging
+ uses: actions/checkout@v5
+ with:
+ persist-credentials: true # Needed to commit and push later
+ ref: asf-staging
+ - name: Reset HTML
run: |
- # Create scratch space for staging branch
- mkdir asf-staging
-
- cd asf-staging
-
- # Check if asf-staging branch exists
- if git show-ref --verify --quiet refs/remotes/origin/asf-staging; then
- echo "asf-staging branch exists, checking it out"
- git checkout -B asf-staging origin/asf-staging
- else
- echo "asf-staging branch doesn't exist!"
- exit 1
- fi
-
- # Remove existing contents
rm -rf *
-
- # Copy all contents from output directory to temporary directory
- if [ -d "output" ]; then
- cp -r ../output/* . 2>/dev/null || true
- fi
-
- # Restore top level files
- #git restore .htaccess .asf.yaml
+ - name: Download HTML artifact
+ uses: actions/download-artifact@v5
+ with:
+ name: html
+ - name: List files
+ run: ls -la
+ - name: Restore files
+ run: |
+ git restore .htaccess
+ git restore .asf.yaml
- # Add all files
- git add .
-
- # Show what will be committed
- echo "Files to be committed:"
- git status --porcelain
-
- # Check if there are changes to commit
- if git diff --staged --quiet; then
- echo "No changes to commit"
- else
- git commit -m "Deploy site build from ${{ github.ref_name }} - ${{
github.sha }}"
- echo "Would push to asf-staging"
- echo "Successfully deployed to asf-staging branch"
- git show --stat
- fi
+ - name: Commit
+ run: |
+ git config --global user.name "GitHub Actions"
+ git config --global user.email "[email protected]"
+ git commit -m "Deploy site build from ${{ github.ref_name }} - ${{
github.sha }}"
+ git show --stat
- name: Create deployment summary
run: |