mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
docs_deploy.yml - update to create backup and always be single release (#24781)
* docs_deploy.yml - update to create backup and always be single release * Add build time variable to make it easier to confirm last successful deploy
This commit is contained in:
parent
39fa8b5550
commit
873f704ae3
15
.github/workflows/docs_deploy.yml
vendored
15
.github/workflows/docs_deploy.yml
vendored
@ -79,16 +79,21 @@ jobs:
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
git clone --single-branch --branch main https://${{ secrets.PX4BUILTBOT_PERSONAL_ACCESS_TOKEN }}@github.com/PX4/docs.px4.io.git
|
||||
git clone --single-branch --branch main --depth 1 https://${{ secrets.PX4BUILTBOT_PERSONAL_ACCESS_TOKEN }}@github.com/PX4/docs.px4.io.git
|
||||
CURRENT_DATETIME=$(date +'%Y%m%d_%H_%M')
|
||||
# make it an orphan branch
|
||||
git checkout --orphan "${CURRENT_DATETIME}_main"
|
||||
rm -rf docs.px4.io/${BRANCH_NAME}
|
||||
mkdir -p docs.px4.io/${BRANCH_NAME}
|
||||
cp -r ~/_book/* docs.px4.io/${BRANCH_NAME}/
|
||||
cd docs.px4.io
|
||||
git config --global user.name "${{ secrets.PX4BUILDBOT_USER }}"
|
||||
git config --global user.email "${{ secrets.PX4BUILDBOT_EMAIL }}"
|
||||
git add ${BRANCH_NAME}
|
||||
git add .
|
||||
git commit -a -m "PX4 docs build update (vitepress) `date`"
|
||||
#git add .
|
||||
#git commit --amend -m "PX4 docs build update (vitepress) `date`"
|
||||
#git commit --allow-empty -m "Empty commit to force rebuild"
|
||||
# push branch as backup
|
||||
git push origin "${CURRENT_DATETIME}_main"
|
||||
# Now make main from backup and push updated
|
||||
git branch -D main
|
||||
git checkout -b main
|
||||
git push origin main -f
|
||||
|
||||
@ -37,6 +37,10 @@ export default {
|
||||
//Tabs: https://github.com/Red-Asuka/vitepress-plugin-tabs
|
||||
app.component("Tab", Tab);
|
||||
app.component("Tabs", Tabs);
|
||||
// Global build time variable
|
||||
app.config.globalProperties.$buildTime = JSON.stringify(
|
||||
new Date().toISOString()
|
||||
);
|
||||
},
|
||||
|
||||
// to support medium zoom: https://github.com/vuejs/vitepress/issues/854
|
||||
|
||||
@ -137,3 +137,5 @@ The PX4 flight stack is hosted under the governance of the [Dronecode Project](h
|
||||
<a href="https://www.linuxfoundation.org/projects" style="padding:20px;"><img src="https://mavlink.io/assets/site/logo_linux_foundation.png" alt="Linux Foundation Logo" width="80px" /></a>
|
||||
|
||||
<div style="padding:10px"> </div>
|
||||
|
||||
Doc build time: {{ $buildTime }}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user