public...

This commit is contained in:
Ciro Santilli
2021-04-28 13:00:12 +00:00
parent 6a4f5c531e
commit c11b27ced9
2 changed files with 14 additions and 3 deletions

View File

@@ -9,4 +9,4 @@ pages:
- index.html
expire_in: 1 day
only:
- gh-pages
- gl-pages

View File

@@ -17,9 +17,20 @@ if [ ! -d "$gh_pages_dir" ]; then
git clone --branch gh-pages --depth 1 "$(git remote get-url origin)" "$gh_pages_dir"
fi
cp README.html "${gh_pages_dir}/index.html"
cp .gitlab-ci.yml "${gh_pages_dir}"
git -C "$gh_pages_dir" add .
if git -C "$gh_pages_dir" commit -m "$(git log -1 --format="%H")"; then
git -C "$gh_pages_dir" push
git -C "$gh_pages_dir" push git@gitlab.com:cirosantilli/china-dictatorship.git
fi
# GitLab pages
gl_pages_dir=out/gl-pages
if [ ! -d "$gl_pages_dir" ]; then
mkdir -p "${gl_pages_dir}/public"
git clone --branch gl-pages --depth 1 "$(git remote get-url origin)" "$gl_pages_dir"
fi
cp README.html "${gl_pages_dir}/public/index.html"
cp .gitlab-ci.yml "${gl_pages_dir}"
git -C "$gl_pages_dir" add .
if git -C "$gl_pages_dir" commit -m "$(git log -1 --format="%H")"; then
git -C "$gl_pages_dir" push
fi