peaceiris / actions-gh-pages

GitHub Actions for GitHub Pages 🚀 Deploy static files and publish your site easily. Static-Site-Generators-friendly.
https://github.com/marketplace/actions/github-pages-action
MIT License
4.71k stars 373 forks source link

support: Empty commit #760

Closed Cryptex-github closed 2 years ago

Cryptex-github commented 2 years ago

Checklist

Describe your question

The workflow won't push files to gh-pages branch, even if there are files in the public folder.

Relevant links

Public repository: https://github.com/TerbiumLang/wasm
YAML config: https://github.com/TerbiumLang/wasm/blob/80672fc38db9567498af5fb670a0c2db56f97eb9/.github/workflows/publish.yml
YAML workflow: https://github.com/TerbiumLang/wasm/runs/6800279763

Relevant log output

Run ls public README.md index.html package.json terbium_playground.d.ts terbium_playground.js terbium_playground_bg.wasm terbium_playground_bg.wasm.d.ts

Run peaceiris/actions-gh-pages@v3 with: github_token: *** publish_dir: public publish_branch: gh-pages allow_empty_commit: false keep_files: false force_orphan: false enable_jekyll: false disable_nojekyll: false exclude_assets: .github [INFO] Usage https://github.com/peaceiris/actions-gh-pages#readme Dump inputs [INFO] GithubToken: true [INFO] PublishBranch: gh-pages [INFO] PublishDir: public [INFO] DestinationDir: [INFO] ExternalRepository: [INFO] AllowEmptyCommit: false [INFO] KeepFiles: false [INFO] ForceOrphan: false [INFO] UserName: [INFO] UserEmail: [INFO] CommitMessage: [INFO] FullCommitMessage: [INFO] TagName: [INFO] TagMessage: [INFO] EnableJekyll (DisableNoJekyll): false [INFO] CNAME: [INFO] ExcludeAssets .github

Setup auth token [INFO] setup GITHUB_TOKEN Prepare publishing assets [INFO] ForceOrphan: false /usr/bin/git clone --depth=1 --single-branch --branch gh-pages *github.com/TerbiumLang/wasm.git /home/runner/actions_github_pages_1654715503877 Cloning into '/home/runner/actions_github_pages_1654715503877'... [INFO] clean up /home/runner/actions_github_pages_1654715503877 [INFO] chdir /home/runner/actions_github_pages_1654715503877 /usr/bin/git rm -r --ignore-unmatch [INFO] chdir /home/runner/actions_github_pages_1654715503877 [INFO] prepare publishing assets [INFO] copy /home/runner/work/wasm/wasm/public to /home/runner/actions_github_pages_1654715503877 [INFO] delete excluded assets rm: no paths given [INFO] Created /home/runner/actions_github_pages_1654715503877/.nojekyll Setup Git config /usr/bin/git remote rm origin /usr/bin/git remote add origin github.com/TerbiumLang/wasm.git /usr/bin/git add --all /usr/bin/git config user.name Cryptex-github /usr/bin/git config user.email Cryptex-github@users.noreply.github.com Create a commit /usr/bin/git commit -m deploy: 80672fc38db9567498af5fb670a0c2db56f97eb9 On branch gh-pages nothing to commit, working tree clean [INFO] skip commit Push the commit or tag /usr/bin/git push origin gh-pages Everything up-to-date [INFO] Action successfully completed

Additional context.

Initially, it won't even create a new branch, it just fails with

Push the commit or tag
  /usr/bin/git push origin gh-pages
  error: src refspec gh-pages does not match any
  error: failed to push some refs to 'https://github.com/TerbiumLang/wasm.git'
  Error: Action failed with "The process '/usr/bin/git' failed with exit code 1"

I then created the branch manually and now is doing nothing.

peaceiris commented 2 years ago

The log just says:

nothing to commit, working tree clean

I recommend you to read the section about the allow_empty_commit input option first.

Cryptex-github commented 2 years ago

The log just says:

nothing to commit, working tree clean

I recommend you to read the section about the allow_empty_commit input option first.

But there are file changes (the public folder), well anyways I resolved it by saving it to a different folder.

github-actions[bot] commented 2 years ago

This issue has been LOCKED because of it being resolved!

The issue has been fixed and is therefore considered resolved. If you still encounter this or it has changed, open a new issue instead of responding to solved ones.

Log | Bot Usage