Coder Social home page Coder Social logo

Comments (2)

JamesIves avatar JamesIves commented on May 25, 2024 1

The action is primarily tested on Ubuntu, you may need to install Git or do some other types of configuration on the machine prior to running the action on something other.

@MaicolAntali This error isn't the same as the one in the original post. You're running into a branch protection issue - "remote: error: GH006: Protected branch update failed for refs/heads/docs."

from github-pages-deploy-action.

MaicolAntali avatar MaicolAntali commented on May 25, 2024

I got a similar error on ubuntu-latest

Log:

    ╭━━━╮╭╮╭╮╱╭╮╱╱╭╮╱╱╭━━━╮
    ┃╭━╮┣╯╰┫┃╱┃┃╱╱┃┃╱╱┃╭━╮┃
    ┃┃╱╰╋╮╭┫╰━╯┣╮╭┫╰━╮┃╰━╯┣━━┳━━┳━━┳━━╮
    ┃┃╭━╋┫┃┃╭━╮┃┃┃┃╭╮┃┃╭━━┫╭╮┃╭╮┃┃━┫━━┫
    ┃╰┻━┃┃╰┫┃╱┃┃╰╯┃╰╯┃┃┃╱╱┃╭╮┃╰╯┃┃━╋━━┃
    ╰━━━┻┻━┻╯╱╰┻━━┻━━╯╰╯╱╱╰╯╰┻━╮┣━━┻━━╯
    ╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╭━╯┃
    ╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╰━━╯
    ╭━━━╮╱╱╱╱╱╭╮╱╱╱╱╱╱╱╱╭━━━╮╱╱╭╮
    ╰╮╭╮┃╱╱╱╱╱┃┃╱╱╱╱╱╱╱╱┃╭━╮┃╱╭╯╰╮
    ╱┃┃┃┣━━┳━━┫┃╭━━┳╮╱╭╮┃┃╱┃┣━┻╮╭╋┳━━┳━╮
    ╱┃┃┃┃┃━┫╭╮┃┃┃╭╮┃┃╱┃┃┃╰━╯┃╭━┫┃┣┫╭╮┃╭╮╮
    ╭╯╰╯┃┃━┫╰╯┃╰┫╰╯┃╰━╯┃┃╭━╮┃╰━┫╰┫┃╰╯┃┃┃┃
    ╰━━━┻━━┫╭━┻━┻━━┻━╮╭╯╰╯╱╰┻━━┻━┻┻━━┻╯╰╯
    ╱╱╱╱╱╱╱┃┃╱╱╱╱╱╱╭━╯┃
    ╱╱╱╱╱╱╱╰╯╱╱╱╱╱╱╰━━╯
    

    💖 Support: https://github.com/sponsors/JamesIves
    📣 Maintained by James Ives: https://jamesiv.es/

    🚀 Getting Started Guide: https://github.com/JamesIves/github-pages-deploy-action
    ❓ Discussions / Q&A: https://github.com/JamesIves/github-pages-deploy-action/discussions
    🔧 Report a Bug: https://github.com/JamesIves/github-pages-deploy-action/issues
Checking configuration and starting deployment… 🚦
Deploying using Deploy Token… 🔑
Configuring git…
/usr/bin/git config --global --add safe.directory /home/runner/work/clashJ/clashJ
/usr/bin/git config user.name MaicolAntali
/usr/bin/git config user.email [email protected]
/usr/bin/git config core.ignorecase false
/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
Unable to unset previous git config authentication as it may not exist, continuing…
/usr/bin/git remote rm origin
/usr/bin/git remote add origin ***github.com/MaicolAntali/clashJ.git
Git configured… 🔧
Starting to commit changes…
/usr/bin/git ls-remote --heads ***github.com/MaicolAntali/clashJ.git refs/heads/docs
f72f4884115bce0afbef45a2a40dac3c681f697c	refs/heads/docs
Creating worktree…
/usr/bin/git fetch --no-recurse-submodules --depth=1 origin docs
From https://github.com/MaicolAntali/clashJ
 * branch            docs       -> FETCH_HEAD
 * [new branch]      docs       -> origin/docs
/usr/bin/git worktree add --no-checkout --detach github-pages-deploy-action-temp-deployment-folder
Preparing worktree (detached HEAD be0bae7)
/usr/bin/git checkout -B docs origin/docs
Previous HEAD position was be0bae7 Update `docs.yaml` (#47)
Switched to a new branch 'docs'
branch 'docs' set up to track 'origin/docs'.
/usr/bin/chmod -R +rw /home/runner/work/clashJ/clashJ/clashJ/build/dokka/html
/usr/bin/rsync -q -av --checksum --progress /home/runner/work/clashJ/clashJ/clashJ/build/dokka/html/. github-pages-deploy-action-temp-deployment-folder --delete --exclude CNAME --exclude .nojekyll --exclude .ssh --exclude .git --exclude .github
Checking if there are files to commit…
/usr/bin/git add --all .
/usr/bin/git checkout -b github-pages-deploy-action/9g5h3smmv
Switched to a new branch 'github-pages-deploy-action/9g5h3smmv'
/usr/bin/git commit -m Deploying to docs from @ MaicolAntali/clashJ@be0bae7345fc88830ff5a2c0ea34dc41171502c6 🚀 --quiet --no-verify
Force-pushing changes...
/usr/bin/git push --force ***github.com/MaicolAntali/clashJ.git github-pages-deploy-action/9g5h3smmv:docs
remote: error: GH006: Protected branch update failed for refs/heads/docs.        
remote: error: 2 of 2 required status checks are expected.        
To https://github.com/MaicolAntali/clashJ.git
 ! [remote rejected] github-pages-deploy-action/9g5h3smmv -> docs (protected branch hook declined)
error: failed to push some refs to 'https://github.com/MaicolAntali/clashJ.git'
Running post deployment cleanup jobs… 🗑️
/usr/bin/git checkout -B github-pages-deploy-action/9g5h3smmv
Reset branch 'github-pages-deploy-action/9g5h3smmv'
/usr/bin/chmod -R +rw github-pages-deploy-action-temp-deployment-folder
/usr/bin/git worktree remove github-pages-deploy-action-temp-deployment-folder --force
Error: The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 1 ❌
Notice: Deployment failed! ❌

Workflow file

name: "Generate docs"

on:
  push:
    branches:
      - main
    tags:
      - "*.*.*"

permissions:
  contents: write

jobs:
  generate:
    name: "Generating documentation with Dokka"
    runs-on: ubuntu-latest
    steps:
      - name: "🛎️ Checkout"
        uses: actions/checkout@v3
        with:
          persist-credentials: false

      - name: "⚙️ Set up JDK-17"
        uses: actions/setup-java@v3
        with:
          distribution: temurin
          java-version: 17

      - name: "🐘 Setup Gradle"
        uses: gradle/gradle-build-action@v2

      - name: "🔨 Build the docs"
        run: ./gradlew dokkaHtml

      - name: "🚀 Publish documentation"
        uses: JamesIves/github-pages-deploy-action@releases/v4
        with:
          BRANCH: docs
          FOLDER: clashJ/build/dokka/html

from github-pages-deploy-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.