pwd
ls -lah export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
# make a new temp dir which will be our GitHub Pages docroot
docroot=`mktemp -d`
export REPO_NAME="${GITHUB_REPOSITORY##*/}"
############## # BUILD DOCS # ##############
# first, cleanup any old builds' static assets make -C docs clean
# get a list of branches, excluding 'HEAD' and 'gh-pages'
versions="`git for-each-ref '--format=%(refname:lstrip=-1)' refs/remotes/origin/ | grep -viE '^(HEAD|gh-pages)$'`"
ls for current_version in ${versions}; do
# make the current language available to conf.py export current_version
git checkout ${current_version}
echo"INFO: Building sites for ${current_version}"
cd docs && python3 mm-converter.py
cd ..
# skip this branch if it doesn't have our docs dir & sphinx config if [ ! -e 'docs/conf.py' ]; then echo -e "\tINFO: Couldn't find 'docs/conf.py' (skipped)"
continue fi
languages="en" for current_language in ${languages}; do
# make the current language available to conf.py export current_language
########## # BUILDS # ########## echo"INFO: Building for ${current_language}"
# HTML #
sphinx-build -b html docs/ docs/_build/html/${current_language}/${current_version} -D language="${current_language}"
# add .nojekyll to the root so that github won't 404 on content added to dirs # that start with an underscore (_), such as our "_content" dir..
touch .nojekyll
# add redirect from the docroot to our default docs language/version cat > index.html <<EOF
<!DOCTYPE html>
<html>
<head>
<title>${REPO_NAME} Docs</title>
<meta http-equiv = "refresh" content="0; url='/${REPO_NAME}/en/master/'" />
</head>
<body>
<p>Please wait while you're redirected to our documentation.
</body>
</html>
EOF
# copy the resulting html pages built from sphinx above to our new git repo
git add .
# commit all the new files
msg="Updating Docs for commit ${GITHUB_SHA} made on `date -d"@${SOURCE_DATE_EPOCH}" --iso-8601=seconds` from ${GITHUB_REF} by ${GITHUB_ACTOR}"
git commit -am "${msg}"
# overwrite the contents of the gh-pages branch on our github.com repo
git push deploy gh-pages --force
popd # return to main repo sandbox root
# exit cleanly
exit 0
Messung V0.5
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.