Closed Xylambda closed 2 years ago
Hi @Xylambda, I'll recommend using the master version of the action to use the newest stable version of the push functionality. The error looks like that you use the wrong credentials (password) instead of the token. Could you please check the used credentials on your side inside the repository and maybe create custom personal access token and use as a GitHub Secret?
Hi, thanks for the quick response.
I am gonna list some things and changes that I've tried:
yml
file:name: github pages
on:
push:
branches:
- master
- develop
jobs:
build_docs_job:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.PUSH_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Python Set Up
uses: actions/setup-python@master
with:
python-version: 3.8
- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
- name: Install dependencies
run: |
python3 -m pip install . -r requirements-dev.txt
- name: Make Sphinx docs
run: |
make -C docs clean
make -C docs html
- name: Init new repository in dist folder and commit generated files
run: |
cd docs/build/html/
git init
git remote add origin https://${{ secrets.PUSH_TOKEN }}$@github.com/Xylambda/kalmankit
git config --global --add safe.directory /github/workspace/docs/build/html
touch .nojekyll
git add -A
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m 'deploy'
- name: Force push to destination branch
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PUSH_TOKEN }}$
branch: gh-pages
force: true
directory: ./docs/build/html
Nothing seems to work. The yml file is not using, as far as I am concerned, any password authetication.
Well, that did the trick. I feel kind of silly. Thank you very much for your time and help @ZPascal
Feel free to close the issue since it is solved.
Hi,
I am unable to make this action push to a
gh-pages
branch despite the fact that everything seems to be well configured. (Probably is my lack of knowledge, TBH):Error Output:
yml file and repo
This is the repo and this is the actions file, which a I copy-paste below:
Permissions
The Actions permissions seem to also be okey:
I am pretty sure this is not a bug (in this action), but I cannot really understand why this is not working.
Thanks in advance.