Skip to content

Add action to copy files to gh-pages branch #11

@wmdietl

Description

@wmdietl

#5 tried doing this:

    # Copy the files to the gh-pages branch
    - name: Copy To Branches Action
      uses: planetoftheweb/copy-to-branches@v1.2
      env:
        key: main
        branches: gh-pages
        files: afu-template.md cf-template.md CFLogo.png README.md index.md pom.xml 404.html src/main/java/io/github/eisop/website/EisopSiteGenerator.java

but this resulted in the following errors:

--GIT FETCH origin
From https://github.com/eisop/eisop.github.io
 * [new branch]        dependabot/maven/com.diffplug.spotless-spotless-maven-plugin-2.37.0 -> origin/dependabot/maven/com.diffplug.spotless-spotless-maven-plugin-2.37.0
 * [new branch]        gh-pages   -> origin/gh-pages
 * [new branch]        master     -> origin/master
--GIT CHECKOUT -b gh-pages origin/gh-pages
Previous HEAD position was eba1cda8 Merge 6906143c55076a08096e33b[15](https://github.com/eisop/eisop.github.io/actions/runs/5069751387/jobs/9103809692#step:6:16)ba43765fbea68e0 into f01d0dd31e655782f6213faeeed81506cbffd1d9
branch 'gh-pages' set up to track 'origin/gh-pages'.
Switched to a new branch 'gh-pages'
--GIT CHECKOUT main -- afu-template.md
fatal: invalid reference: main
--GIT CHECKOUT main -- cf-template.md
fatal: invalid reference: main
--GIT CHECKOUT main -- CFLogo.png
fatal: invalid reference: main
--GIT CHECKOUT main -- README.md
fatal: invalid reference: main
--GIT CHECKOUT main -- index.md
fatal: invalid reference: main
--GIT CHECKOUT main -- pom.xml
fatal: invalid reference: main
--GIT CHECKOUT main -- 404.html
fatal: invalid reference: main
--GIT CHECKOUT main -- src/main/java/io/github/eisop/website/EisopSiteGenerator.java
fatal: invalid reference: main
[gh-pages 75a24e2b] Moving files afu-template.md cf-template.md CFLogo.png README.md index.md pom.xml 404.html src/main/java/io/github/eisop/website/EisopSiteGenerator.java using main
 7 files changed, 8 insertions(+)
 create mode 100644 target/classes/io/github/eisop/website/EisopSiteGenerator.class
 create mode 100644 target/eisop.github.io-1.0-SNAPSHOT-jar-with-dependencies.jar
 create mode 100644 target/eisop.github.io-1.0-SNAPSHOT.jar
 create mode 100644 target/maven-archiver/pom.properties
 create mode 100644 target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
 create mode 100644 target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
 create mode 100644 target/spotless-index
remote: Permission to eisop/eisop.github.io.git denied to github-actions[bot].
fatal: unable to access 'https://github.com/eisop/eisop.github.io/': The requested URL returned error: [40](https://github.com/eisop/eisop.github.io/actions/runs/5069751387/jobs/9103809692#step:6:41)3
error: pathspec 'main' did not match any file(s) known to git
===================================

Figure out a way to properly implement this, probably as a separate action that can be run if desired. Or maybe only once a change is merged into main.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions