@@ -144,6 +144,74 @@ jobs:
144144 env :
145145 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
146146
147+ publish-documentation :
148+ name : Publish - Documentation
149+ needs : [publish-npm,analyze-changes]
150+ runs-on : ubuntu-latest
151+
152+ steps :
153+ - name : Documentation Deploy Steps
154+ run : echo "Documentation Deploy Steps"
155+
156+ - name : Checkout Project
157+ uses : actions/checkout@v4
158+ with :
159+ fetch-depth : 0
160+
161+ - name : Setup Node
162+ uses : actions/setup-node@v4
163+ with :
164+ node-version-file : ' .nvmrc'
165+ registry-url : ' https://registry.npmjs.org'
166+ cache : ' yarn'
167+
168+ - name : Restore Dependencies Cache
169+ uses : actions/cache/restore@v4
170+ with :
171+ path : ' **/node_modules'
172+ key : node-modules-${{ hashFiles('./yarn.lock') }}
173+
174+ - name : Restore Distributables Cache
175+ uses : actions/cache/restore@v4
176+ with :
177+ path : ' **/dist'
178+ key : dist-${{ env.rid }}
179+
180+ - name : Synchronize Packages
181+ run : yarn
182+
183+ - name : Build tools and set versions
184+ run : |
185+ yarn package-tools sync --tag ${GITHUB_REF##*/}
186+
187+ - name : Build samples locally
188+ run : yarn samples:build
189+
190+ - name : Copy samples to docs
191+ run : ./copy_to_docs.sh
192+
193+ - name : Set Git Identity
194+ run : |
195+ git config user.email "${GIT_AUTHOR_EMAIL}"
196+ git config user.name "${GIT_AUTHOR_NAME}"
197+
198+ - name : Get existing changelog from documentation Branch
199+ run : |
200+ git fetch origin documentation
201+ git checkout origin/documentation -- docs/changelog/logs
202+
203+ - name : Update changelog
204+ run : yarn package-tools changelog --packages ${{ needs.analyze-changes.outputs.node-recursive }} --tag ${GITHUB_REF##*/} --commit ${{ github.event.before }}
205+
206+ - name : Update Changelog and Publish Docs Folder
207+ run : |
208+ # Check if there's anything to commit before committing
209+ if [ -n "$(git status --porcelain)" ]; then
210+ git add docs/
211+ git commit -m "chore(docs): update docs"
212+ git push origin HEAD:documentation --force
213+ fi
214+
147215 publish-tag :
148216 name : Publish - Tags
149217 runs-on : ubuntu-latest
0 commit comments