Socket
Socket
Sign inDemoInstall

gh-pages

Package Overview
Dependencies
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gh-pages - npm Package Compare versions

Comparing version 3.1.0 to 3.2.0

12

changelog.md

@@ -0,1 +1,13 @@

## v3.2.0
This release updates a few development dependencies and adds a bit of documentation.
* [#391](https://github.com/tschaub/gh-pages/pull/391) - Update dev dependencies ([@tschaub](https://github.com/tschaub))
* [#375](https://github.com/tschaub/gh-pages/pull/375) - Add note about domain problem ([@demee](https://github.com/demee))
* [#390](https://github.com/tschaub/gh-pages/pull/390) - Fix little typo in the README ([@cizordj](https://github.com/cizordj))
* [#388](https://github.com/tschaub/gh-pages/pull/388) - Bump hosted-git-info from 2.8.8 to 2.8.9 ([@tschaub](https://github.com/tschaub))
* [#387](https://github.com/tschaub/gh-pages/pull/387) - Bump y18n from 4.0.0 to 4.0.3 ([@tschaub](https://github.com/tschaub))
* [#378](https://github.com/tschaub/gh-pages/pull/378) - Add GitHub Actions tips to readme.md ([@mickelsonmichael](https://github.com/mickelsonmichael))
* [#386](https://github.com/tschaub/gh-pages/pull/386) - Bump lodash from 4.17.14 to 4.17.21 ([@tschaub](https://github.com/tschaub))
## v3.1.0

@@ -2,0 +14,0 @@

10

package.json
{
"name": "gh-pages",
"version": "3.1.0",
"version": "3.2.0",
"description": "Publish to a gh-pages branch on GitHub (or any other branch on any other remote)",

@@ -46,8 +46,8 @@ "keywords": [

"devDependencies": {
"chai": "^4.2.0",
"chai": "^4.3.4",
"dir-compare": "^1.8.0",
"eslint": "^7.3.0",
"eslint": "^7.27.0",
"eslint-config-tschaub": "^13.1.0",
"mocha": "^8.0.1",
"sinon": "^8.0.4",
"mocha": "^8.4.0",
"sinon": "^10.0.0",
"tmp": "^0.2.1"

@@ -54,0 +54,0 @@ },

@@ -387,4 +387,52 @@

The `gh-pages` module writes temporary files to a `node_modules/.cache/gh-pages` directory. The location of this directory can be customized by setting the `CACHE_DIR` environemnt variable.
The `gh-pages` module writes temporary files to a `node_modules/.cache/gh-pages` directory. The location of this directory can be customized by setting the `CACHE_DIR` environment variable.
If `gh-pages` fails, you may find that you need to manually clean up the cache directory. To remove the cache directory, run `node_modules/gh-pages/bin/gh-pages-clean` or remove `node_modules/.cache/gh-pages`.
### Deploying to github pages with custom domain
Modify the deployment line to your deploy script if you use custom domain. This will prevent the deployment from removing the domain settings in GitHub.
```
echo 'your_cutom_domain.online' > ./build/CNAME && gh-pages -d build"
```
### Deploying with GitHub Actions
In order to deploy with GitHub Actions, you will need to define a user and set the git repository for the process. See the example step below
```yaml
- name: Deploy with gh-pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npx gh-pages -d build -u "github-actions-bot <support+actions@github.com>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
The `secrets.GITHUB_TOKEN` is provided automatically as part of the GitHub Action and does not require any further configuration, but simply needs to be passed in as an environmental variable to the step. `GITHUB_REPOSITORY` is the owner and repository name and is also passed in automatically, but does not need to be added to the `env` list.
See [Issue #345](https://github.com/tschaub/gh-pages/issues/345) for more information
#### Deploying with GitHub Actions and a named script
If you are using a named script in the `package.json` file to deploy, you will need to ensure you pass the variables properly to the wrapped `gh-pages` script. Given the `package.json` script below:
```json
"scripts": {
"deploy": "gh-pages -d build"
}
```
You will need to utilize the `--` option to pass any additional arguments:
```yaml
- name: Deploy with gh-pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm run deploy -- -u "github-actions-bot <support+actions@github.com>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
See [Pull Request #368](https://github.com/tschaub/gh-pages/pull/368) for more information.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc