Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # To contribute improvements to CI/CD templates, please follow the Development guide at:
- # https://docs.gitlab.com/ee/development/cicd/templates.html
- # This specific template is located at:
- # https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Pages/HTML.gitlab-ci.yml
- # Full project: https://gitlab.com/pages/plain-html
- # Some information taken from https://docs.gitlab.com/ee/user/project/pages/introduction.html#serving-compressed-assets
- image: 'alpine:latest' # The version of the Alpine Linux distribution it will use.
- pages: # Defines what name it should be called.
- stage: deploy # Tells it that it is meant to be deployed.
- script: # What it runs.
- - echo 'Compressing certain file types, which are located in the public folder...' # Prints out that text.
- - find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\|svg\)$' -print0 -exec gzip -f -kv -6 {} \; # Finds in the public folder those types of files, then compresses them.
- - echo 'Finished compressing file(s).' # Prints out that text.
- artifacts:
- paths: # Path of the folder(s).
- - public # What folder to use.
- only: # Only uses the specified branch.
- - trunk # What branch to use.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement