Skip to content
Compare
Choose a tag to compare
@JamesIves JamesIves released this 02 Mar 14:02
· 417 commits to releases/v3 since this release

Major Changes

import run, {
  init,
  deploy,
  generateBranch,
  actionInterface
} from "github-pages-deploy-action";

Calling the functions directly will require you to pass in an object containing the variables found in the configuration section, you'll also need to provide a workspace with a path to your project.

import run from "github-pages-deploy-action";

run({
  folder: "build",
  branch: "gh-pages",
  workspace: "src/project/location",
  accessToken: process.env["ACCESS_TOKEN"]
});

For more information regarding the action interface please click here.

  • Added the ability to specify a remote repository using the REPOSITORY_NAME option. This should be formatted like so: JamesIves/github-pages-deploy-action. This gets populated by default in the actions environment, but may need to be overwritten if you want to deploy to a different remote.

  • Improved error handling. It will now correctly provide the correct error message when the deployment fails, and will also stop early instead of running all the way through until it can't anymore.

  • By default the git commands are now hidden from the users view, and a number of console logs will instead provide the actions status. This can be overridden by applying the DEBUG flag.

Minor Changes

  • Added a number of helper functions that check the required action parameters, and suppress any sensitive information. This adds a fail safe incase either the actions environment doesn't properly hide a secret, or if the user is running the action via the node module.

  • Improved the overall number of tests.

  • Added the ability to modify the workspace path.

  • Added an .nvmrc file.

  • Updated the action.yml file with the new configuration changes.

Special Thanks

Big thank you to @XAMPPRocky for all of their help testing these changes!