| 1 |
@echo off |
| 2 |
REM This script was copied from PythonQwt project |
| 3 |
REM ====================================================== |
| 4 |
REM Upload GitHub Pages documentation |
| 5 |
REM ====================================================== |
| 6 |
REM Licensed under the terms of the MIT License |
| 7 |
REM Copyright (c) 2020 Pierre Raybaut |
| 8 |
REM (see PythonQwt LICENSE file for more details) |
| 9 |
REM ====================================================== |
| 10 |
|
| 11 |
@REM Get the target path for GitHub Pages from `DATALAB_GHPAGES` environment variable: |
| 12 |
@REM if this variable is not defined, interrupt the script and show an error message |
| 13 |
if not defined DATALAB_GHPAGES ( |
| 14 |
echo ERROR: DATALAB_GHPAGES environment variable is not defined. |
| 15 |
echo Please define it to the path of the local clone of the GitHub Pages repository. |
| 16 |
echo For instance: |
| 17 |
echo set DATALAB_GHPAGES=C:\Dev\DataLab-Platform.github.io |
| 18 |
echo. |
| 19 |
echo Then, run this script again. |
| 20 |
exit /b 1 |
| 21 |
) |
| 22 |
|
| 23 |
call %~dp0utils GetScriptPath SCRIPTPATH |
| 24 |
|
| 25 |
pushd %DATALAB_GHPAGES% |
| 26 |
git checkout main |
| 27 |
git add . |
| 28 |
git commit -m "Update documentation" |
| 29 |
git push origin main |
| 30 |
popd |
| 31 |
|
| 32 |
call %FUNC% EndOfScript |