I’m having issues pushing a github pages build.
Here’s my yaml configuration.
kind: pipeline
name: default
steps:
- name: build
image: cbrgm/drone-hugo:latest
settings:
hugo_version: 0.81
validate: true
url: https://www.esamir.com
- name: publish
image: plugins/gh-pages
settings:
pages_directory: public
upstream_name: https://github.com/safaci2000/safaci2000.github.io.git
target_branch: master
force_push: true
username:
from_secret: gh_username
password:
from_secret: gh_password
I generated a personal access token as detailed here which I’m using for the value for password passed in via gh_password.
When the build runs, I get this error:
+ git push https://github.com/******/******.github.io.git HEAD:master
To https://github.com/******/******.github.io.git
! [rejected] HEAD -> master (fetch first)
error: failed to push some refs to 'https://github.com/******/******.github.io.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
2021/02/25 09:41:51 failed to push changes: exit status 1
You can see the full output of the build here. Any thoughts what I’m doing wrong. I think the force_push: true
isn’t supported but I haven’t found any equivalent.
Based on what i’m reading i’m leaning towards it not being supported for that particular plugin. Did I miss something?