Attempt to fix build file permission issues.

This commit is contained in:
Jon Petto 2019-04-23 15:07:44 -05:00
Родитель dacbcc6f36
Коммит 3d406b153e
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -34,9 +34,10 @@ docker run --rm --label=gulp \
# -e HUGO_ENV=production : tell hugo to build a production-ready version of the site
# ash -c "rm -rf..." : remove any old build artifacts and rebuild the site using the config matching the command line argument ($1)
# chown 1001:1000 : make sure the resulting `release` directory is owned by gitlab-runner user
docker run --rm --label=hugo \
--volume=$(pwd):/src \
--volume=$(pwd)/release:/tmp/build \
-e HUGO_ENV=production \
jojomi/hugo:0.40.2 \
ash -c "rm -rf /tmp/build/* && hugo --config config.toml,config-$1.toml --destination /tmp/build"
ash -c "rm -rf /tmp/build/* && hugo --config config.toml,config-$1.toml --destination /tmp/build && chown 1001:1001 /tmp/build -R"