Socket
Socket
Sign inDemoInstall

@jamesives/github-pages-deploy-action

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jamesives/github-pages-deploy-action - npm Package Compare versions

Comparing version 4.2.2 to 4.2.3

1

__tests__/env.js
process.env.ACTIONS_STEP_DEBUG = 'false'
process.env.RUNNER_OS = 'Windows'

4

__tests__/main.test.ts

@@ -6,2 +6,3 @@ // Initial env variable setup for tests.

process.env['GITHUB_REF_NAME'] = 'test'
process.env['RUNNER_OS'] = 'Linux'

@@ -31,3 +32,4 @@ import '../src/main'

isDebug: jest.fn(),
info: jest.fn()
info: jest.fn(),
notice: jest.fn()
}))

@@ -34,0 +36,0 @@

@@ -227,3 +227,3 @@ import {ActionInterface, TestFlag} from '../src/constants'

expect(e instanceof Error && e.message).toMatch(
'No deployment token/method was provided. You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. If you wish to use an ssh deploy token then you must set SSH to true.'
'No deployment token/method was provided. You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. For more details on how to use an ssh deploy key please refer to the documentation.'
)

@@ -248,3 +248,3 @@ }

expect(e instanceof Error && e.message).toMatch(
'No deployment token/method was provided. You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. If you wish to use an ssh deploy token then you must set SSH to true.'
'No deployment token/method was provided. You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. For more details on how to use an ssh deploy key please refer to the documentation.'
)

@@ -251,0 +251,0 @@ }

// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/typescript-node
{
"name": "Node.js & TypeScript",
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "14"
}
},
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
"extensions": [
"dbaeumer.vscode-eslint"
],
"remoteUser": "node"
"name": "Node.js & TypeScript",
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "14"
}
},
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
"extensions": ["dbaeumer.vscode-eslint"],
"remoteUser": "node"
}

@@ -26,4 +26,20 @@ "use strict";

(0, core_1.info)(`
GitHub Pages Deploy Action 🚀
╭━━━╮╭╮╭╮╱╭╮╱╱╭╮╱╱╭━━━╮
┃╭━╮┣╯╰┫┃╱┃┃╱╱┃┃╱╱┃╭━╮┃
┃┃╱╰╋╮╭┫╰━╯┣╮╭┫╰━╮┃╰━╯┣━━┳━━┳━━┳━━╮
┃┃╭━╋┫┃┃╭━╮┃┃┃┃╭╮┃┃╭━━┫╭╮┃╭╮┃┃━┫━━┫
┃╰┻━┃┃╰┫┃╱┃┃╰╯┃╰╯┃┃┃╱╱┃╭╮┃╰╯┃┃━╋━━┃
╰━━━┻┻━┻╯╱╰┻━━┻━━╯╰╯╱╱╰╯╰┻━╮┣━━┻━━╯
╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╭━╯┃
╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╰━━╯
╭━━━╮╱╱╱╱╱╭╮╱╱╱╱╱╱╱╱╭━━━╮╱╱╭╮
╰╮╭╮┃╱╱╱╱╱┃┃╱╱╱╱╱╱╱╱┃╭━╮┃╱╭╯╰╮
╱┃┃┃┣━━┳━━┫┃╭━━┳╮╱╭╮┃┃╱┃┣━┻╮╭╋┳━━┳━╮
╱┃┃┃┃┃━┫╭╮┃┃┃╭╮┃┃╱┃┃┃╰━╯┃╭━┫┃┣┫╭╮┃╭╮╮
╭╯╰╯┃┃━┫╰╯┃╰┫╰╯┃╰━╯┃┃╭━╮┃╰━┫╰┫┃╰╯┃┃┃┃
╰━━━┻━━┫╭━┻━┻━━┻━╮╭╯╰╯╱╰┻━━┻━┻┻━━┻╯╰╯
╱╱╱╱╱╱╱┃┃╱╱╱╱╱╱╭━╯┃
╱╱╱╱╱╱╱╰╯╱╱╱╱╱╱╰━━╯
`);
(0, core_1.info)(`
💖 Support: https://github.com/sponsors/JamesIves

@@ -54,7 +70,9 @@ 📣 Maintained by James Ives: https://jamesiv.es

finally {
(0, core_1.info)(`${status === constants_1.Status.FAILED
const terminationMessage = `${status === constants_1.Status.FAILED
? 'Deployment failed! ❌'
: status === constants_1.Status.SUCCESS
? 'Completed deployment successfully! ✅'
: 'There is nothing to commit. Exiting early… 📭'}`);
: 'There is nothing to commit. Exiting early… 📭'}`;
(0, core_1.info)(terminationMessage);
(0, core_1.notice)(terminationMessage);
(0, core_1.exportVariable)('deployment_status', status);

@@ -61,0 +79,0 @@ (0, core_1.setOutput)('deployment-status', status);

@@ -43,3 +43,3 @@ "use strict";

if (!hasRequiredParameters(action, ['token', 'sshKey'])) {
throw new Error('No deployment token/method was provided. You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. If you wish to use an ssh deploy token then you must set SSH to true.');
throw new Error('No deployment token/method was provided. You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. For more details on how to use an ssh deploy key please refer to the documentation.');
}

@@ -56,3 +56,3 @@ if (!hasRequiredParameters(action, ['branch'])) {

if (!constants_1.SupportedOperatingSystems.includes(process.env.RUNNER_OS)) {
(0, core_1.info)(`The operating system you're using is not supported and results may be varied. Please refer to the documentation for more details. ❗`);
(0, core_1.warning)(`The operating system you're using is not supported and results may be varied. Please refer to the documentation for more details. ❗`);
}

@@ -59,0 +59,0 @@ };

@@ -5,3 +5,3 @@ {

"author": "James Ives <iam@jamesiv.es> (https://jamesiv.es)",
"version": "4.2.2",
"version": "4.2.3",
"license": "MIT",

@@ -44,3 +44,3 @@ "main": "lib/lib.js",

"@types/jest": "27.4.0",
"@types/node": "17.0.8",
"@types/node": "17.0.13",
"@typescript-eslint/eslint-plugin": "4.33.0",

@@ -50,3 +50,3 @@ "@typescript-eslint/parser": "4.33.0",

"eslint-config-prettier": "8.3.0",
"eslint-plugin-jest": "25.3.4",
"eslint-plugin-jest": "26.0.0",
"eslint-plugin-prettier": "4.0.0",

@@ -58,4 +58,4 @@ "jest": "26.6.3",

"ts-jest": "26.5.6",
"typescript": "4.5.4"
"typescript": "4.5.5"
}
}
<p align="center">
<a href="https://github.com/marketplace/actions/deploy-to-github-pages">
<img alt="" width="200px" src="https://github.com/JamesIves/github-pages-deploy-action/raw/dev/.github/assets/icon.png">
<img alt="GitHub Pages Deploy Action Logo" width="200px" src="https://github.com/JamesIves/github-pages-deploy-action/raw/dev/.github/assets/icon.png">
</a>

@@ -38,8 +38,20 @@ </p>

<p align="center">
<img src="https://github.com/JamesIves/github-pages-deploy-action/raw/dev/.github/assets/screenshot.png">
<img src="https://github.com/JamesIves/github-pages-deploy-action/raw/dev/.github/assets/screenshot.png" alt="">
</p>
<p align="center">
Maintainence of this project is made possible by all the <a href="https://github.com/JamesIves/github-pages-deploy-action/graphs/contributors">contributors</a> and <a href="https://github.com/sponsors/JamesIves">sponsors</a>. If you'd like to sponsor this project and have your avatar or company logo appear below <a href="https://github.com/sponsors/JamesIves">click here</a>. 💖
</p>
<p align="center">
<!-- premium --><!-- premium -->
</p>
<p align="center">
<!-- sponsors --><a href="https://github.com/Chooksta69"><img src="https://github.com/Chooksta69.png" width="50px" alt="Chooksta69" /></a>&nbsp;&nbsp;<a href="https://github.com/milanpollock"><img src="https://github.com/milanpollock.png" width="50px" alt="milanpollock" /></a>&nbsp;&nbsp;<a href="https://github.com/robjtede"><img src="https://github.com/robjtede.png" width="50px" alt="robjtede" /></a>&nbsp;&nbsp;<!-- sponsors -->
</p>
## Getting Started :airplane:
You can include the action in your workflow to trigger on any event that [GitHub actions supports](https://help.github.com/en/articles/events-that-trigger-workflows). If the remote branch that you wish to deploy to doesn't already exist the action will create it for you. Your workflow will also need to include the `actions/checkout` step before this workflow runs in order for the deployment to work.
You can include the action in your workflow to trigger on any event that [GitHub actions supports](https://help.github.com/en/articles/events-that-trigger-workflows). If the remote branch that you wish to deploy to doesn't already exist the action will create it for you. Your workflow will also need to include the `actions/checkout` step before this workflow runs in order for the deployment to work. If you intend to make multiple deployments in quick succession [you may need to levereage the concurrency parameter in your workflow](https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency) to prevent overlaps.

@@ -53,6 +65,7 @@ You can view an example of this below.

build-and-deploy:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.5.1
uses: actions/checkout@v2

@@ -65,3 +78,3 @@ - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.2.2
uses: JamesIves/github-pages-deploy-action@v4.2.3
with:

@@ -184,3 +197,3 @@ branch: gh-pages # The branch the action should deploy to.

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.2.2
uses: JamesIves/github-pages-deploy-action@v4.2.3
with:

@@ -203,6 +216,7 @@ branch: gh-pages

deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.5.1
uses: actions/checkout@v2

@@ -215,3 +229,3 @@ - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.2.2
uses: JamesIves/github-pages-deploy-action@v4.2.3
with:

@@ -257,3 +271,3 @@ branch: gh-pages

- name: Checkout 🛎️
uses: actions/checkout@v2.5.1
uses: actions/checkout@v2

@@ -272,2 +286,3 @@ - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.

deploy:
concurrency: ci-${{ github.ref }}
needs: [build] # The second job must depend on the first one to complete before running, and uses ubuntu-latest instead of windows.

@@ -277,3 +292,3 @@ runs-on: ubuntu-latest

- name: Checkout 🛎️
uses: actions/checkout@v2.5.1
uses: actions/checkout@v2

@@ -286,3 +301,3 @@ - name: Download Artifacts 🔻 # The built project is downloaded into the 'site' folder.

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.2.2
uses: JamesIves/github-pages-deploy-action@v4.2.3
with:

@@ -308,3 +323,3 @@ branch: gh-pages

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.2.2
uses: JamesIves/github-pages-deploy-action@v4.2.3
```

@@ -329,6 +344,7 @@

deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.5.1
uses: actions/checkout@v2

@@ -341,3 +357,3 @@ - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.2.2
uses: JamesIves/github-pages-deploy-action@v4.2.3
with:

@@ -356,9 +372,1 @@ branch: gh-pages

If you wish to remove these files you must go into the deployment branch directly to remove them. This is to prevent accidental changes in your deployment script from creating breaking changes.
---
## Support 💖
This project would not be possible without all of our fantastic [contributors](https://github.com/JamesIves/github-pages-deploy-action/graphs/contributors) and [sponsors](https://github.com/sponsors/JamesIves). If you'd like to support the maintenance and upkeep of this project you can [donate via GitHub Sponsors](https://github.com/sponsors/JamesIves).
<!-- sponsors --><a href="https://github.com/milanpollock"><img src="https://github.com/milanpollock.png" width="50px" alt="" /></a><a href="https://github.com/raoulvdberge"><img src="https://github.com/raoulvdberge.png" width="50px" alt="" /></a><!-- sponsors -->

@@ -1,2 +0,2 @@

import {exportVariable, info, setFailed, setOutput} from '@actions/core'
import {exportVariable, info, notice, setFailed, setOutput} from '@actions/core'
import {ActionInterface, NodeActionInterface, Status} from './constants'

@@ -24,4 +24,21 @@ import {deploy, init} from './git'

info(`
GitHub Pages Deploy Action 🚀
╭━━━╮╭╮╭╮╱╭╮╱╱╭╮╱╱╭━━━╮
┃╭━╮┣╯╰┫┃╱┃┃╱╱┃┃╱╱┃╭━╮┃
┃┃╱╰╋╮╭┫╰━╯┣╮╭┫╰━╮┃╰━╯┣━━┳━━┳━━┳━━╮
┃┃╭━╋┫┃┃╭━╮┃┃┃┃╭╮┃┃╭━━┫╭╮┃╭╮┃┃━┫━━┫
┃╰┻━┃┃╰┫┃╱┃┃╰╯┃╰╯┃┃┃╱╱┃╭╮┃╰╯┃┃━╋━━┃
╰━━━┻┻━┻╯╱╰┻━━┻━━╯╰╯╱╱╰╯╰┻━╮┣━━┻━━╯
╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╭━╯┃
╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╰━━╯
╭━━━╮╱╱╱╱╱╭╮╱╱╱╱╱╱╱╱╭━━━╮╱╱╭╮
╰╮╭╮┃╱╱╱╱╱┃┃╱╱╱╱╱╱╱╱┃╭━╮┃╱╭╯╰╮
╱┃┃┃┣━━┳━━┫┃╭━━┳╮╱╭╮┃┃╱┃┣━┻╮╭╋┳━━┳━╮
╱┃┃┃┃┃━┫╭╮┃┃┃╭╮┃┃╱┃┃┃╰━╯┃╭━┫┃┣┫╭╮┃╭╮╮
╭╯╰╯┃┃━┫╰╯┃╰┫╰╯┃╰━╯┃┃╭━╮┃╰━┫╰┫┃╰╯┃┃┃┃
╰━━━┻━━┫╭━┻━┻━━┻━╮╭╯╰╯╱╰┻━━┻━┻┻━━┻╯╰╯
╱╱╱╱╱╱╱┃┃╱╱╱╱╱╱╭━╯┃
╱╱╱╱╱╱╱╰╯╱╱╱╱╱╱╰━━╯
`)
info(`
💖 Support: https://github.com/sponsors/JamesIves

@@ -57,14 +74,16 @@ 📣 Maintained by James Ives: https://jamesiv.es

status = Status.FAILED
setFailed(extractErrorMessage(error))
} finally {
info(
`${
status === Status.FAILED
? 'Deployment failed! ❌'
: status === Status.SUCCESS
? 'Completed deployment successfully! ✅'
: 'There is nothing to commit. Exiting early… 📭'
}`
)
const terminationMessage = `${
status === Status.FAILED
? 'Deployment failed! ❌'
: status === Status.SUCCESS
? 'Completed deployment successfully! ✅'
: 'There is nothing to commit. Exiting early… 📭'
}`
info(terminationMessage)
notice(terminationMessage)
exportVariable('deployment_status', status)

@@ -71,0 +90,0 @@ setOutput('deployment-status', status)

@@ -1,2 +0,2 @@

import {isDebug, info} from '@actions/core'
import {isDebug, warning} from '@actions/core'
import {existsSync} from 'fs'

@@ -50,2 +50,3 @@ import path from 'path'

)
return Boolean(nonNullParams.length)

@@ -58,3 +59,3 @@ }

throw new Error(
'No deployment token/method was provided. You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. If you wish to use an ssh deploy token then you must set SSH to true.'
'No deployment token/method was provided. You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy. For more details on how to use an ssh deploy key please refer to the documentation.'
)

@@ -82,3 +83,3 @@ }

) {
info(
warning(
`The operating system you're using is not supported and results may be varied. Please refer to the documentation for more details. ❗`

@@ -85,0 +86,0 @@ )

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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