title: How to get pelican site generate on GitLab Pages when continuous integration passes and artifacts are being built?
body: <p>I used pelican as the static site generator to build a static site. I wanted to host it on GitLab Pages and let the site generate with GitLab's continuous integration with Makefile. </p>
  
  <p>The site successfully builds locally as well as on GitLab via its CI/CD pipeline.
  The build code passes with artifacts uploaded and job succeeded. The content files are built and produced in the <code>public</code> folder. </p>
  
  <p>Somehow, after the build being passed and artifacts being uploaded in <code>public</code> folder as desired, it was expected to have the static site hosted on the user pages of GitLab Pages like <code>username.gitlab.io/projectname</code>.</p>
  
  <p>This did not work even after 15+ hours though the recommended wait time was fifteen minutes to half an hour. </p>
  
  <p>Hosting on a custom subdomain was also tried. The subdomain is verified, yet the site is not being generated.</p>
  
  <p>For reference, minimal code in use is mentioned below.</p>
  
  <h3>.gitlab-ci.yml</h3>
  
  <pre><code># default to using the latest Python docker image for builds
  image: python:3.7.0
  
  # our build job installs the Python requirements and Pelican
  # plugins, then runs ``make publish`` to generate the output
  build:
    stage: deploy
    script:
    - apt-get update -qq &amp;&amp; apt-get install -y -qq python python-pip
    - python -v
    - pip install  -r requirements.txt
    - git clone --recursive https://github.com/getpelican/pelican-plugins ../plugins
    - pelican -s publishconf.py
    - make publish
  # specify the artifacts to save
    artifacts:
      paths:
        - public/
    only:
    - master
  </code></pre>
  
  <h3>publishconf.py</h3>
  
  <pre><code>#!/usr/bin/env python
  # -*- coding: utf-8 -*- #
  from __future__ import unicode_literals
  import os
  
  AUTHOR = 'Tanya Jain'
  SITENAME = 'Tanya Jain'
  SITEURL = '/public'
  DESCRIPTION = ''
  THEME = 'themes/stellarAdventurerTheme'
  
  PATH = 'content'
  OUTPUT_PATH = 'public'
  </code></pre>
  
  <h3>pelicanconf.py</h3>
  
  <pre><code>#!/usr/bin/env python
  # -*- coding: utf-8 -*- #
  from __future__ import unicode_literals
  import os
  
  AUTHOR = 'Tanya Jain'
  SITENAME = 'Tanya Jain'
  SITEURL = '/public'
  DESCRIPTION = ''
  THEME = 'themes/stellarAdventurerTheme'
  
  PATH = 'content'
  OUTPUT_PATH = 'public'
  </code></pre>
  
  <h3>Makefile</h3>
  
  <pre><code>PY?=python3
  PELICAN?=pelican
  PELICANOPTS=
  
  BASEDIR=$(CURDIR)
  INPUTDIR=$(BASEDIR)/content
  OUTPUTDIR=$(BASEDIR)/public
  CONFFILE=$(BASEDIR)/pelicanconf.py
  PUBLISHCONF=$(BASEDIR)/publishconf.py
  
  FTP_HOST=localhost
  FTP_USER=anonymous
  FTP_TARGET_DIR=/
  
  SSH_HOST=localhost
  SSH_PORT=22
  SSH_USER=root
  SSH_TARGET_DIR=/var/www
  </code></pre>
  
  <p>Kindly help out on how to generate the site on GitLab Pages!</p>
  
  <h2>Update 1:</h2>
  
  <p>Tried these changes which too did not work. Yet, I believe the changes are to be made in the pelican settings and not the GitLab's YAML.</p>
  
  <h3>pelicanconf.py</h3>
  
  <pre><code>SITEURL = ''
  </code></pre>
  
  <h3>publishconf.py</h3>
  
  <pre><code>SITEURL = 'http://subdomain.example.com'
  </code></pre>