@@ -82,53 +82,30 @@ jobs:
82
82
url : ${{ steps.deployment.outputs.page_url }}
83
83
84
84
steps :
85
- - uses : actions/checkout@v4
85
+ - name : Checkout Repository
86
+ uses : actions/checkout@v4
87
+ with :
88
+ persist-credentials : false
89
+ fetch-depth : 0
86
90
87
- - name : Make build.sh executable
88
- run : chmod +x build.sh
91
+ - name : Download Built Docs Artifact
92
+ uses : actions/download-artifact@v4
93
+ with :
94
+ name : docs-raw
95
+ path : ${{ github.workspace }}/build
89
96
90
- - name : Install deps
91
- run : npm ci
97
+ - name : Install Dependencies
98
+ run : npm install
92
99
93
- # ----- Build Docusaurus site (./build) -----
94
- - name : Build docs site
100
+ - name : Build TinaCMS and Docusaurus Site
95
101
env :
96
- ENABLE_TINA_ADMIN : true
97
102
TINA_PUBLIC_CLIENT_ID : ${{ secrets.TINA_PUBLIC_CLIENT_ID }}
98
- TINA_TOKEN : ${{ secrets.TINA_TOKEN }}
99
- DOCS_BASEURL : ${{ secrets.DOCS_BASEURL }} # e.g. /Docusaurus-docs/
103
+ TINA_TOKEN : ${{ secrets.TINA_TOKEN }}
104
+ DOCS_BASEURL : ${{ secrets.DOCS_BASEURL }}
100
105
run : npm run build
101
-
102
- # ----- Build Tina admin (./admin) -----
103
- - name : Build TinaCMS admin
104
- env :
105
- TINA_PUBLIC_CLIENT_ID : ${{ secrets.TINA_PUBLIC_CLIENT_ID }}
106
- TINA_TOKEN : ${{ secrets.TINA_TOKEN }}
107
- ENABLE_TINA_ADMIN : true
108
- run : npx tinacms build
109
-
110
- # ----- Copy Tina into <baseUrl>/admin -----
111
- - name : Relocate Tina admin inside baseUrl
112
- run : |
113
- set -euo pipefail
114
- BASE="${DOCS_BASEURL#/}" # strip leading /
115
- BASE="${BASE%/}" # strip trailing /
116
- SRC="./public/admin" # <<— correct location from tinacms build
117
- # If you still move it to static/cms-admin elsewhere, use that path instead
118
- if [[ ! -d "$SRC" ]]; then
119
- echo "Tina admin folder not found at $SRC"; exit 1;
120
- fi
121
- if [[ -z "$BASE" ]]; then
122
- DEST="./build/admin"
123
- else
124
- DEST="./build/${BASE}/admin"
125
- fi
126
- echo "Copying $SRC → $DEST"
127
- mkdir -p "$DEST"
128
- cp -a "$SRC"/. "$DEST"/
129
- ls -R "$DEST" | head
130
- env :
131
- DOCS_BASEURL : ${{ secrets.DOCS_BASEURL }}
106
+
107
+ - name : Remove gitignore file
108
+ run : rm ./build/admin/.gitignore
132
109
133
110
# --- Upload static site as artifact ---
134
111
- name : Upload Pages artifact
0 commit comments