Make gitlab CI example script faster (#1171)

By using alpine, the time to pull and start the container decreases.
By using the official alpine zola package, the script gets simpler.
Also, this updates the zola version to the latest release.
This commit is contained in:
Rafael Epplée 2020-09-18 15:35:38 +02:00 committed by GitHub
parent 9f367ae7e7
commit d04a52d096
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 9 deletions

View File

@ -37,20 +37,19 @@ The second step is to tell the GitLab continuous integration runner how to creat
To do this, create a file called `.gitlab-ci.yml` in the root directory of your repository. To do this, create a file called `.gitlab-ci.yml` in the root directory of your repository.
```yaml ```yaml
image: alpine:latest
variables: variables:
# This variable will ensure that the CI runner pulls in your theme from the submodule # This variable will ensure that the CI runner pulls in your theme from the submodule
GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_STRATEGY: recursive
# Specify the zola version you want to use here # Specify the zola version you want to use here
ZOLA_VERSION: "v0.9.0" ZOLA_VERSION: "v0.12.0"
pages: pages:
script: script:
# Download the zola executable and store it in zola.tar.gz # Install the zola package from the alpine testing repositories
- curl -L https://github.com/getzola/zola/releases/download/$ZOLA_VERSION/zola-$ZOLA_VERSION-x86_64-unknown-linux-gnu.tar.gz > zola.tar.gz - apk add --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ zola
# Unpack the zola executable
- tar -xzf zola.tar.gz
# Execute zola build # Execute zola build
- ./zola build - zola build
artifacts: artifacts:
paths: paths: