File tree Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -43,35 +43,25 @@ jobs:
4343
4444 - name : Create or checkout asf-staging branch
4545 run : |
46+ # Create scratch space for staging branch
47+ mkdir asf-staging
48+ cd asf-staging
4649 # Check if asf-staging branch exists
4750 if git show-ref --verify --quiet refs/remotes/origin/asf-staging; then
4851 echo "asf-staging branch exists, checking it out"
4952 git checkout -B asf-staging origin/asf-staging
5053 else
51- echo "asf-staging branch doesn't exist, creating it"
52- git checkout --orphan asf-staging
53- git rm -rf .
54+ echo "asf-staging branch doesn't exist!"
55+ exit 1
5456 fi
5557
5658 - name : Copy build output to asf-staging branch
5759 run : |
58- # Create a temporary directory for the site content
59- mkdir -p /tmp/site-content
60-
6160 # Copy all contents from output directory to temporary directory
6261 if [ -d "output" ]; then
63- cp -r output/* /tmp/site-content/ 2>/dev/null || true
62+ cp -r output/* asf-staging 2>/dev/null || true
6463 fi
6564
66- # Remove all files except .git
67- find . -not -path './.git*' -delete 2>/dev/null || true
68-
69- # Copy site content back to root
70- cp -r /tmp/site-content/* . 2>/dev/null || true
71-
72- # Clean up temporary directory
73- rm -rf /tmp/site-content
74-
7565 # Add all files
7666 git add .
7767
You can’t perform that action at this time.
0 commit comments