Giter Site home page Giter Site logo

peaceiris / actions-gh-pages Goto Github PK

View Code? Open in Web Editor NEW
4.5K 26.0 361.0 7.7 MB

GitHub Actions for GitHub Pages 馃殌 Deploy static files and publish your site easily. Static-Site-Generators-friendly.

Home Page: https://github.com/marketplace/actions/github-pages-action

License: MIT License

Shell 3.38% TypeScript 95.15% JavaScript 0.59% CSS 0.08% HTML 0.81%
github-actions github-pages static-site-generator actions hugo gatsby mkdocs vuepress mdbook nextjs

actions-gh-pages's Introduction

actions-gh-pages's People

Contributors

cito avatar corollari avatar deimosfr avatar deining avatar dependabot-preview[bot] avatar dependabot[bot] avatar elsatch avatar imgbot[bot] avatar imomaliev avatar indyjonesnl avatar kingofzeal avatar lete114 avatar mambax avatar mhucka avatar mikaelsmith avatar nikos912000 avatar oprypin avatar peaceiris avatar renovate[bot] avatar romanhotsiy avatar sarisia avatar sasoria avatar spicyricecaker avatar sukkaw avatar ta1m1kam avatar tanducmai avatar thundermiracle avatar tripleight avatar wilfred avatar zhouzi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

actions-gh-pages's Issues

What am I doing wrong?

Hello,

In my case I am added as a collaborator (full admin access) to an Organization. I am trying to setup a simple static site push to gh-pages. I have setup using ACTIONS_DEPLOY_KEY. The deploy succeeds but the site changes are not reflected. In-fact if I manually delete gh-pages branch and re-run the action, it succeeds again, but the site is never published. All the code seems okay in gh-pages. What am I doing wrong? here' s my action yaml

name: Publish Site

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Master Branch
        uses: actions/checkout@v1

      - name: Build
        run: |
          rm -rf dist
          rsync -rv --exclude=.git --exclude=.github . dist

      - name: Deploy to gh-pages
        uses: peaceiris/[email protected]
        env:
          ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
          PUBLISH_BRANCH: gh-pages
          PUBLISH_DIR: ./dist

Originally posted by @shaunakv1 in #9 (comment)

Parameter for keeping only last commit in `gh-pages`

Hello.

Would it be possible to implement some parameter which will keep only the last commit for the gh-pages containing generated HTML files?

-> I do not want to keep the "standard" commit history for HTML pages (gh-pages) - therefore some parameter which will keep only the last commit (with last HTML pages) may be handy.

Update: readme

I found it. The following step will work well for only private repo. And there is no docker build step, it completes fast.

    - name: Deploy
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        PUBLISH_BRANCH: gh-pages # or master
        PUBLISH_DIR: ./public
      run: |
        wget https://raw.githubusercontent.com/peaceiris/actions-gh-pages/v2.4.0/entrypoint.sh
        bash ./entrypoint.sh

For private repositories, the above approach works well but public repositories failed.

    - name: Deploy
      uses: peaceiris/[email protected]
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        PUBLISH_BRANCH: gh-pages
        PUBLISH_DIR: ./public

The above (use action) also works well for only private repo.

Originally posted by @peaceiris in #9 (comment)


  • change: ssh key path for script mode.
  • docs: Add new section script mode
  • docs: Add GITHUB_TOKEN for only private repo.

Prevent empty commits happen

Is your feature request related to a problem? Please describe.
Sometimes I add commits to master which don't change gh-pages output. Empty commits add to gh-pages in such case.

Example of such commits: experiment with github actions, re-run github actions, add drafts content etc.

Describe the solution you'd like
No add empty commits to gh-pages. Just do nothing then.

I generate gh-pages using peaceiris/[email protected].

Custom domain support

The current version of the action seems like it doesn't support custom domain. It would be great if we could set the CNAME via the deploy command.

Use docker image from GitHub Package Registry

2019-09-02: We cannot pull docker images from GitHub Package Registry.
cf. Workflow syntax for GitHub Actions - GitHub Help

I asked about this at Use docker images from GitHub Package Registry - GitHub Community Forum

.github/workflows/docker-image-ci.yml

on:
  release:
    types: [published, created]

    - name: push latest image
      env:
        DOCKER_IMAGE: docker.pkg.github.com/${{ github.repository }}/action:latest
        PKG_GITHUB_TOKEN: ${{ secrets.PKG_GITHUB_TOKEN }}
      run: |
        echo ${PKG_GITHUB_TOKEN} | docker login docker.pkg.github.com -u peaceiris --password-stdin
        docker push ${DOCKER_IMAGE} &&
        docker logout

Adding peaceiris/actions-gh-pages@v2 to action with PUBLISH_BRANCH: master and PUBLISH_DIR: . causes it to self-delete each time it runs

Adding

   - name: Deploy	
      uses: peaceiris/actions-gh-pages@v2	
      env:	
        ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}	
        #PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}	
        #GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}	
        PUBLISH_BRANCH: master	
        PUBLISH_DIR: .

to the end of a workflow causes it to delete the workflow file from github each time it runs:
broadinstitute/omim-search@b83f911
Example run logs are here:
https://github.com/macarthur-lab/omim-search/runs/366450678

Update mkdocs example

If I understood correctly, the mkdocs example uses the retired actions-pipenv. It this statement holds, it might be worth updateing the example to a supported architecture

Enhancement: Deploy to other repo

Hello @peaceiris , thank you for developing this GitHub Action!

Here's my enhancement suggestion: I want to be able to deploy the build artifact from repo A to the GitHub Pages branch of repo B.

Use case: If you develop a website in a private GitHub repo that you want to deploy to your user github page (<username>.github.io) you have to deploy from repo A to repo B.

Suggestion: Replace GITHUB_REPOSITORY with a custom configurable variable.

Bug: forceOrphan isn't working with actions-gh-pages@v3

Describe the bug
forceOrphan isn't working with actions-gh-pages@v3. The older version @v2 is working fine with that parameter.

To Reproduce

I'm using the following "Deploy":

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        if: github.event_name == 'push' && github.ref == 'refs/heads/master'
        with:
          deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
          publish_dir: ./public
          forceOrphan: true

But after that I can see additional commit in my gh-pages branch (https://github.com/ruzickap/action-test/commits/gh-pages).

Expected behavior
I hope this will work the same like in version @v2

Your YAML file

Additional context

Logs:

/bin/chmod 600 /home/runner/.ssh/known_hosts
[INFO] wrote /home/runner/.ssh/github
/bin/chmod 600 /home/runner/.ssh/github
[INFO] wrote /home/runner/.ssh/config
/bin/chmod 600 /home/runner/.ssh/config
/usr/bin/ssh-add /home/runner/.ssh/github
Identity added: /home/runner/.ssh/github ([email protected])
[INFO] remoteURL: [email protected]:ruzickap/action-test.git
[INFO] ForceOrphan: false
/usr/bin/git clone --depth=1 --single-branch --branch gh-pages [email protected]:ruzickap/action-test.git /home/runner/actions_github_pages
Cloning into '/home/runner/actions_github_pages'...
Warning: Permanently added the RSA host key for IP address '140.82.113.3' to the list of known hosts.
/usr/bin/git rm -r --ignore-unmatch *
rm 'CNAME'
rm 'index.html'
[INFO] copy /home/runner/work/action-test/action-test/public/CNAME
[INFO] copy /home/runner/work/action-test/action-test/public/index.html
/usr/bin/git remote rm origin
/usr/bin/git remote add origin [email protected]:ruzickap/action-test.git
/usr/bin/git add --all
/usr/bin/git commit -m deploy: 1f265a6f07dd5cf3ddddb48caf28d28a5a597de8
[gh-pages d18ee8b] deploy: 1f265a6f07dd5cf3ddddb48caf28d28a5a597de8
 2 files changed, 2 insertions(+), 2 deletions(-)
/usr/bin/git push origin gh-pages
To github.com:ruzickap/action-test.git
   e122b2f..d18ee8b  gh-pages -> gh-pages
[INFO] successfully deployed

Action passed with silent failure when no gh-pages branch existed

Thanks for publishing this action.

I followed the readme instructions but ran into what may be a common but undocumented case.

I'm publishing for the first time and no gh-pages branch exists.

The action proceeds to stage changes but they never get pushed to my PUBLISH_BRANCH

Cloning into '/github/home/b8c542550a778e3eb0ca70abff3d5482'...
warning: Could not find remote branch gh-pages to clone.
fatal: Remote branch gh-pages not found in upstream origin
Initialized empty Git repository in /github/workspace/target/doc/.git/
Switched to a new branch 'gh-pages'
fatal: No such remote: 'origin'
INFO: Allowing empty commits: 
[gh-pages (root-commit) 975a973] Automated deployment: Sun Sep 22 04:26:54 UTC 2019 3a9dc85d243d35fe33b4992ae2a042c6793e8861
 131 files changed, 15230 insertions(+)
 create mode 100755 .lock
...more files...

My workflow step is configured with

- name: Publish
        uses: docker://peaceiris/gh-pages:v2.3.1
        env:
          PUBLISH_BRANCH: gh-pages
          PUBLISH_DIR: ./target/doc
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

fatal: Could not read from remote repository.

Describe the bug
I got this problem while deploying Gatsbyjs project to github pages.

Load key "/root/.ssh/id_rsa": invalid format
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
##[error]Docker run failed with exit code 128

To Reproduce
Here's How I created the .yml file

name: github pages

on:
  push:
    branches:
    - master

jobs:
  build-deploy:
    runs-on: ubuntu-18.04
    steps:
    - uses: actions/checkout@v1

    - name: Setup Node
      uses: actions/setup-node@v1
      with:
        node-version: '10.x'

    - name: Cache dependencies
      uses: actions/cache@v1
      with:
        path: ~/.npm
        key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
        restore-keys: |
          ${{ runner.os }}-node-
    - run: yarn
    - run: git config --global user.email "[email protected]"
    - run: git config --global user.name "Zeyad Etman"
    
    - run: yarn build

    - name: Deploy
      uses: peaceiris/actions-gh-pages@v2
      env:
        ACTIONS_DEPLOY_KEY: ${{ secrets.GITHUB_API_DEPLOY }}
        PERSONAL_TOKEN: ${{ secrets.GITHUB_API_DEPLOY }}
        PUBLISH_BRANCH: gh-pages
        PUBLISH_DIR: ./public

Expected behavior
It deploys successfully.

Additional context
I'm building with yarn.

proposal: Create Tag on Commit

Is your feature request related to a problem? Please describe.
I'd like to tag specific versions of my gh-pages branch programmatically (in my case, based on package.json version)

Describe the solution you'd like
I'd like an option to add a tag with a specified name on commit.

Describe alternatives you've considered
Manually - PITA.

Additional context
I'm thinking I'd like to be able to use this like so:

- name: Tagged Deploy
  env:
    ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
    PUBLISH_BRANCH: gh-pages
    PUBLISH_DIR: ./public
    CREATE_TAG: ${{ <expression> }}

Where expression might load some values from other steps or combine readily available job information.

Other options for forcing the overwrite of an existing tag or not might make sense too.

Support /docs option with deployments

Is your feature request related to a problem? Please describe.

I would like to deploy to /docs instead of the master or gh-pages branch.

Describe the solution you'd like

Both the source and github pages are located in the master branch:

./src => source of the website
./docs => publish gh-pages website

I would like the files to be deployed to the ./docs folder

Describe alternatives you've considered

I've checked whether gh-pages was possible, but I can't find the option in my gh-pages repository:

image

Additional context
Add any other context or screenshots about the feature request here.

proposal: Allow option to mirror current commit message on external repo commit message

When using EXTERNAL_REPOSITORY, the only option for the commit message is currently

COMMIT_MESSAGE="Automated deployment: $(date -u) ${GITHUB_SHA}"

It would be awesome if we could have the option to have the message of the commit we're currently deploying as the commit message for the external repo, in order to see on the external repo what we've just deployed, instead of the current generic message.

Bug: Successfully pushes to branch only if it does not exist

Describe the bug
Successfully pushes to branch only if it does not exist yet

To Reproduce
Steps to reproduce the behavior:

  1. create repo
  2. deploy to somebranch first time (success)
  3. deploy to somebranch second time (pipeline succeeds, but does not actually push)
  4. delete somebranch
  5. deploy to somebranch third time (success)

Expected behavior
Always push

Your YAML file
https://github.com/VladimirLogachev/vladimirlogachev.github.io

name: Deploy to GitHub Pages
on:
  push:
    branches:
    - dev

jobs:
  build:
    name: Build elm
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Set up elm
        uses: justgook/setup-elm@v1
      - name: Elm Make
        run: elm make src/Main.elm
      - name: Remove sources
        run: |
          rm -rf src
          rm -rf elm-stuff
          rm -rf .github
          rm -f .gitignore
          rm -f README.md
          rm -f elm.json
      - name: Deploy
        uses: peaceiris/actions-gh-pages@v2
        env:
          ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
          PUBLISH_BRANCH: somebranch
          PUBLISH_DIR: .
        with:
          emptyCommits: false

docs: Update Hugo example

  • Update Hugo workflow example (Install Hugo with downloading binary)
  • Remove peaceiris/actions-hugo from README

How to deploy to 'protected branches' with this tool?

Is your feature request related to a problem? Please describe.
It is frustrating that you use a CI/CD tool like this to automate the process and make deploying code easier, but at the same time you require there to be no branch protection on this branch (IE it is still possible to deploy without checks from localhost).

Describe the solution you'd like
An explination of how to avoid this issue, or a clear solution.

Describe alternatives you've considered
I have considered making another GH user account and adding it to my organization as a "machine" user, this user could then have push permission on the protected branch. But this will use an extra slot for our GH payed account. Please advise.

Additional context
This is the exact error I get:
`
remote: error: GH006: Protected branch update failed for refs/heads/gh-pages.
remote: error: At least 1 approving review is required by reviewers with write access.
To github.com:wild-cards/ui.git
``

Proposal: Add option to define custom Git user.name and user.email

Describe the bug
I want to change the user.name and user.email, such as 'test-user' and '[email protected]' for deploy commits.

Expected behavior
Assume this is the commit list:

Commits on Dec 24, 2019
  chore: deploy to gh-pages      
  `orzyyyy` committed 17 minutes ago
      |
      ---------------------->   this one is not the expected user

Commits on Dec 24, 2019
  chore: deploy to gh-pages                        
    `test-user` committed 17 minutes ago
      |
      ---------------------->   this one is expected

Your YAML file

name: deploy

on:
  push:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: set username and email
        run: |
          git config --global user.name "test-user"
          git config --global user.email [email protected]

      - name: checkout
        uses: actions/checkout@master

      - name: install
        run: npm install

      - name: build
        run: npm run build

      - name: debug
        run: git config --list

      - name: deploy
        uses: peaceiris/actions-gh-pages@v2
        env:
          ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
          PUBLISH_BRANCH: gh-pages
          PUBLISH_DIR: ./dist
        with:
          emptyCommits: false

INPUT_EMPTYCOMMITS is not defined with a docker image from Docker Hub

I will fix this by #28

And I found it that inputs were not defined when we use a docker image from Docker Hub without with statement even though we defined emptyCommits default true

I will ask about this behavior at the GitHub Community forum.

INPUT_EMPTYCOMMITS were not defined

    - name: Deploy
      uses: docker://peaceiris/gh-pages:v2.3.1
      env:
        PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
        PUBLISH_BRANCH: gh-pages
        PUBLISH_DIR: ./public
-e PERSONAL_TOKEN -e PUBLISH_BRANCH -e PUBLISH_DIR -e HOME

INPUT_EMPTYCOMMITS were defined

    - name: Deploy
      uses: docker://peaceiris/gh-pages:v2.3.1
      env:
        PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
        PUBLISH_BRANCH: gh-pages
        PUBLISH_DIR: ./public
      with:
        emptyCommits: true
        # emptyCommits: false
-e PERSONAL_TOKEN -e PUBLISH_BRANCH -e PUBLISH_DIR -e INPUT_EMPTYCOMMITS -e HOME

Originally posted by @peaceiris in #27 (comment)

proposal: Migrate to TypeScript action

Is your feature request related to a problem? Please describe.
As a v3.

Describe the solution you'd like
Migrate to a TypeScript action as I did for peaceiris/actions-hugo.

Describe alternatives you've considered
none.

Additional context

  • Add supporting for macOS and Windows.
  • Add test deploy workflow to gh-pages branch on this repo.
    • Publish document site of this action with mdBook.
  • v3 stable tag
    • Add auto update workflow
  • v2
    • Add log output of v3 announcement

Bug: Run failed. [error]File not found

Describe the bug

Run failed with peaceiris/actions-gh-pages@v3

To Reproduce

my yml file:

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        with:
          personal_token: ${{ secrets.PERSONAL_TOKEN }}
          publish_branch: gh-pages
          publish_dir: ./book
          force_orphan: true

error:

Run peaceiris/actions-gh-pages@v3
  with:
    personal_token: ***
    publish_branch: gh-pages
    publish_dir: ./book
    force_orphan: true
    allow_empty_commit: false
    keep_files: false
##[error]File not found: '/home/runner/work/_actions/peaceiris/actions-gh-pages/v3/lib/index.js'

Screenshots
image

proposal: tag the latest release with major version

Is your feature request related to a problem? Please describe.
Could you please tag the latest release with major version (v2 here) ?
With major version tag we can always use the latest action without breaking changes and can specify this action as described in the official document:

https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsuses

Describe the solution you'd like
Tag the latest release with v2 tag

cp: can't create '/.git': File exists | Error on user type repository deployment

Hello I found a recurring error when I try to deploy to my user type repository.

Stack trace:

/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/blog/blog":"/github/workspace" fbc64f:bd4f8c40a2ff4d509a3eda2d208b73d4
INFO: Deploy to asurbernardo/asurbernardo.github.io
INFO: setup with ACTIONS_DEPLOY_KEY
# github.com:22 SSH-2.0-babeld-85ff8279
Cloning into '/github/home/ghpages_12475'...
Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.
rm '404.html'
rm 'CNAME'
rm 'README.md'
rm 'commento.html'
rm 'images/design-inspiration.jpg'
rm 'index.html'
rm 'index.xml'
rm 'install-sw.html'
rm 'manifest.json'
rm 'offline.html'
rm 'posts/el-primer-post-en-mi-nuevo-blog/index.html'
rm 'posts/index.html'
rm 'posts/index.xml'
rm 'posts/la-primera-iteracion-amp-estilos-y-miscelanea/index.html'
rm 'posts/mi-primer-post/index.html'
rm 'sitemap.xml'
rm 'sw.js'
rm 'tags/deploy/index.html'
rm 'tags/deploy/index.xml'
rm 'tags/evolutivo/index.html'
rm 'tags/evolutivo/index.xml'
rm 'tags/git/index.html'
rm 'tags/git/index.xml'
rm 'tags/index.html'
rm 'tags/index.xml'
rm 'tags/iteracion/index.html'
rm 'tags/iteracion/index.xml'
rm 'tags/iteraci贸n/index.html'
rm 'tags/iteraci贸n/index.xml'
cp: can't create '/github/home/ghpages_12475/.git': File exists
##[error]Docker run failed with exit code 123

My action main.yml:

name: Deploy blog
on:
  push:
    branches:
    - master

jobs:
  build-deploy:
    runs-on: ubuntu-latest
    steps:

    - name: Pull source
      uses: actions/checkout@master
      with:
        submodules: true

    - name: Update submodules to latests master
      run: git submodule update --remote

    - name: Setup Hugo
      uses: peaceiris/[email protected]
      with:
        hugo-version: '0.58.3'
        extended: true

    - name: Build
      run: hugo -t amperage --gc --minify

    - name: Deploy script
      uses: peaceiris/[email protected]
      env:
        ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
        EXTERNAL_REPOSITORY: asurbernardo/asurbernardo.github.io
        PUBLISH_BRANCH: master
        PUBLISH_DIR: ./public

I think I've followed the guide correctly, but maybe I'm missing something.

proposal: keep_history option

Is your feature request related to a problem? Please describe.
I'm migrating my pages from travis which provides a keep_history option. If set to false, the building process will only preserve the last commit to the target branch. So I would love to have a similar option here.

Describe the solution you'd like
A keep_history option, default to true.

Describe alternatives you've considered
A remove_history option, default to false.

Additional context
N/A

Unable to deploy static hugo page due to auth issue

Hi! I just setup a new hugo site with the intent to publish to the gh-pages branch of the same repo in the root directory (i.e., .).

The workflow looks like this:

jobs:
  build-deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master

      - name: build
        uses: peaceiris/[email protected]
        with:
          args: --gc --minify --cleanDestinationDir

      - name: deploy
        uses: peaceiris/[email protected]
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PUBLISH_BRANCH: gh-pages
          PUBLISH_DIR: .

It fails on the deploy step with this:

/usr/bin/docker run --name b6eba6be5b8977615c40ca9a20a95bc21bdd74_f636c9 --label b6eba6 --workdir /github/workspace --rm -e GITHUB_TOKEN -e PUBLISH_BRANCH -e PUBLISH_DIR -e HOME -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/p17/p17":"/github/workspace" b6eba6:be5b8977615c40ca9a20a95bc21bdd74
Reinitialized existing Git repository in /github/workspace/.git/
fatal: remote origin already exists.
Switched to a new branch 'gh-pages'
Branch 'gh-pages' set up to track remote branch 'gh-pages' from 'origin'.
[gh-pages 314b0a0] Automated deployment: Thu Sep  5 06:20:36 UTC 2019 466fd027c30da77da2cd2c1dfbf47912ce4c1f15
 4 files changed, 4 insertions(+)
 create mode 100644 public/categories/index.xml
 create mode 100644 public/index.xml
 create mode 100644 public/sitemap.xml
 create mode 100644 public/tags/index.xml
 fatal: could not read Username for 'https://github.com': No such device or address
##[error]Docker run failed with exit code 128

Any ideas on what I'm doing wrong?

Option to not have empty commits

Love the work on this. One question for an enhancement:

I'm curious if a option can be added to either opt in (or opt out, either way) of creating empty commits when publishing.

Basically, I would rather my publish branch (gh_pages) only reflect changes to my site when things actually change. This is especially noticeable as I'm building up my workflow, which is understandably an incremental process.

It looks like the fix would be pretty straightforward here (removing the --allow-empty flag), but I also understand that some may want this behavior, and I'm unsure how to make it something optional.

I can look into it when I have some time, but I probably won't get to it very quickly, so wanted to throw it out to see if someone might be able to pick it up before I can.

"can't create '/github/home/ghpages_30566/.git': File exists"

Hello,
I am trying to build my Hugo website with peaceiris/actions-hugo and deploy with actions-gh-pages to the master branch of my GitHub pages repository.

It fails on the Deploy job where actions-gh-pages is used with the following error:

cp: can't create '/github/home/ghpages_30566/.git': File exists
##[error]Docker run failed with exit code 123

Can it be because of the fact that ./public (my PUBLISH_DIR) is actually a submodule with GitHub pages repo? I used it to quickly build and deploy locally.

Thank you.

proposal: Add support issue template

Is your feature request related to a problem? Please describe.
Help and support users.

Describe the solution you'd like
Add a new issue template for supporting.

Describe alternatives you've considered
N/A

Additional context

  • Add a new workflow to close invalid issues automatically.
    • Ignore template
    • Unrelated to this repo
  • Add a new stale workflow to close old issues automatically.
  • Update FAQs.

Deployment to git repository works but website is not deployed

I have a strange behavior here, which is not strictly related to this action but kinds of defeat its purpose.

Here is a quite trivial repository showing this problem: https://github.com/nicolas-van/hugotest (the attached workflow: https://github.com/nicolas-van/hugotest/blob/master/.github/workflows/hugo.yml )

When I commit something the workflow performs correctly ( https://github.com/nicolas-van/hugotest/actions ) and I can validate it did deploy correctly to the gh-pages branch.

But when I take a look at the deployments ( https://github.com/nicolas-van/hugotest/deployments ) I can see that Github just didn't care re-deploying my website to its static content server. He doesn't seem to understand that there is a new version on the gh-pages branch and doesn't care re-deploying.

I suppose it has something to do with the fact that this action just erase all the commits on the gh-pages branch and make a force push. When I edit a file on that branch (thus creating a new commit) Github seems to detect it correctly and re-deploy my Github Pages site.

Does anyone else has encountered that problem ? If I'm not the only one maybe we could consider adding a mode similar to what Travis uses ( See keep_history https://docs.travis-ci.com/user/deployment/pages/).

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.