Commits showing in CI/CD jobs but not in actual repo nor Activity

At Repository → Files → On branch “main”, it shows a near-barebones repo from 2020.

I can view the repo from my latest commit - not shown in the Commits but the CI/CD Pipelines and Activity!.- and you can see what it should look like.

My CI/CD jobs shows 289 pipelines.


In the pipeline:

  1. I’d push from my client to GitLab
  2. GitLab’d ssh into my droplet, and
  3. git pull from the main branch.

I can view a commit repo thing with the latest files by clicking the commit from the pipeline then “Browse Files”.

commit files

You can see that my site works, as it definitely has way more posts than what’s ostensibly in my repository here:

Here’s my latest pipeline from seven months ago.

$ ssh "cd /var/www/ && git pull && hugo && exit"
Warning: Permanently added ',' (ECDSA) to the list of known hosts.
   fd84c51..508efda  main       -> origin/main
Updating fd84c51..508efda
 .../education/      | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 content/posts/development/clojure/education/
Building sites … 

What further confuses me is that my droplet git pulls the right stuff whereas when I git pull from my personal PC, it pulls the barebones directory.

What do I need to know about GitLab/Git to know how:

  • the pipeline shows commits and merges to the main branch,
  • my droplet can pull the latest commit, but
  • GitLab doesn’t show it in the plain jane Repository > Files > (main branch), and
  • My git pull also pulls the barebones

I’m using for this, and I’m not sure if this’ll help, but here’s my .gitlab-ci.yml:

  - apt-get update -qq
  - apt-get install -qq git
  # Setup SSH deploy keys
  - 'which ssh-agent || ( apt-get install -qq openssh-client )'
  - eval $(ssh-agent -s)
  - ssh-add <(echo "$SSH_PRIVATE_KEY")
  - mkdir -p ~/.ssh
  - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
    name: staging
    - ssh "cd /var/www/ && git pull && hugo && exit"
    - main

This guy shares my issue but he’s not been answered either.