I've created a Gitlab CI job to use pandoc
to create some HTML and PDF assets that I would like to deploy to my Hugo site hosted with Gitlab Pages.
In .gitlab-ci.yml
my job looks like this:
# All available Hugo versions are listed here: https://gitlab.com/pages/hugo/container_registry
stages:
- test
- deploy
- build
variables:
GIT_SUBMODULE_STRATEGY: recursive
test:
image: registry.gitlab.com/pages/hugo:latest
stage: test
script:
- hugo
except:
- master
assets:
stage: build
image:
name: pandoc/latex:2.6
entrypoint: ["/bin/sh", "-c"]
before_script:
- apk add bash
- apk add zip
- chmod +x ci-build.sh
script:
- ./ci-build.sh
artifacts:
paths:
- public
pages:
image: registry.gitlab.com/pages/hugo:latest
stage: deploy
script:
- hugo
artifacts:
paths:
- public
only:
- master
However, the assets generated by this job do not seem to be deployed to my site as I get a 404 when trying to access them.
I have tried setting an artifacts path, but get this error:
artifacts:
paths:
- public
Uploading artifacts...
public: found 369 matching files
Uploading artifacts to coordinator... ok id=281690834 responseStatus=201 Created token=56oqTg7A
Job succeeded
You can find my repo here and my site here if that helps!
I'd really like to figure this out so that I don't have to track the assets in Git. Any help would be most appreciated!