Skip to content

Commit 9142d53

Browse files
committed
Releasing and updating deps.
1 parent e4f84a8 commit 9142d53

7 files changed

Lines changed: 171 additions & 48 deletions

File tree

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog],
66
and this project adheres to [Semantic Versioning].
77

8-
## [Unreleased]
8+
## [1.0.0] - 2023-11-13
9+
10+
### Added
11+
12+
- Everything, really. This is the initial version, and it works.
13+
14+
### To do
15+
16+
- Tests. Lots of tests.

README.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@
22

33
This action deploys a project to Arc XP using your Arc XP credentials.
44

5+
## Description
6+
7+
**NOTE:** This action requires that you have an active Arc XP account. If you do not have an Arc XP account, or you have any questions, please contact your Arc XP representative.
8+
9+
This action deploys a Fusion Bundle to Arc XP using your Arc XP credentials. It will deploy the project to the Arc XP instance that matches the `api-hostname` input. If the project has not been deployed before, it will create an initial deployment. If the project has been deployed before, it will create a new deployment and delete the oldest deployment if the number of deployments exceeds the `minimum-running-versions` input.
10+
11+
## Prerequisites
12+
13+
You must have a Fusion Bundle that has been built and is ready to be deployed. You must also have an Arc XP organization ID, API key, and API hostname.
14+
15+
## Security
16+
17+
This action requires that you have an Arc XP account. It will use your Arc XP API key to authenticate with Arc XP. The API key is stored as a secret in your GitHub repository. The API key is used to authenticate with Arc XP and is not shared with anyone else.
18+
19+
## Usage
20+
21+
```yaml
22+
- name: Perform the deploy
23+
if: ${{ success() }}
24+
uses: arcxp/deploy-action@v1
25+
with:
26+
org-id: your-org-here
27+
api-key: "${{ secrets.YOUR_DEPLOYER_TOKEN_HERE }}"
28+
api-hostname: api.sandbox.your-org-here.arcpublishing.com
29+
bundle-prefix: action-demo-1
30+
```
31+
532
## Inputs
633
734
### `org-id`
@@ -33,3 +60,63 @@ The number of seconds to wait between retries. Default `5`.
3360
The minimum number of versions to keep in a "deployed" state at any given time. The maximum is 10, the minimum is 1. Default `7`.
3461

3562
## Example
63+
64+
Here's a complete example from a GitHub Action workflow file. This example first builds and zips the Fusion Bundle, and then uses this custom action to deploy to the "Sandbox" environment in the `arctesting2` instance of Arc XP.
65+
66+
```yaml
67+
---
68+
name: Deploy a Fusion Bundle with Custom Action
69+
70+
on:
71+
push:
72+
# Adjust this list of branches if you want to use this action
73+
# for PRs and pushes.
74+
branches:
75+
- branch-name-here
76+
# This action lets you run this Action manually.
77+
workflow_dispatch:
78+
79+
jobs:
80+
new-deployer:
81+
runs-on: ubuntu-latest
82+
83+
steps:
84+
- name: Checkout the code
85+
if: ${{ success() }}
86+
uses: actions/checkout@v3
87+
88+
# This configures NodeJS for our purposes.
89+
- name: Set up Node
90+
if: ${{ success() }}
91+
uses: actions/setup-node@v3
92+
with:
93+
#### IF YOU NEED TO CHANGE YOUR NODE VERSION, JUST CHANGE THIS NUMBER
94+
node-version: 20
95+
cache: npm
96+
97+
# Installs NodeJS dependencies.
98+
- name: Install dependencies
99+
if: ${{ success() }}
100+
run: |
101+
npm install
102+
103+
# Build the code.
104+
- name: Build the Fusion Bundle
105+
if: ${{ success() }}
106+
run: |
107+
npm run build
108+
npm run zip
109+
110+
- name: Perform the deploy
111+
if: ${{ success() }}
112+
uses: arcxp/deploy-action@v1
113+
with:
114+
org-id: your-org-here
115+
api-key: "${{ secrets.SANDBOX_DEPLOYER_TOKEN }}"
116+
api-hostname: api.sandbox.your-org-here.arcpublishing.com
117+
bundle-prefix: bundle-prefix-here
118+
```
119+
120+
## License
121+
122+
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name: 'Deploy to Arc XP'
33
description: 'This is an action which makes it convenient to deploy to Arc XP'
44
author: 'Arc XP'
55
branding:
6-
icon: 'monitor'
7-
color: 'purple'
6+
icon: 'truck'
7+
color: 'blue'
88
runs:
99
using: node20
1010
main: dist/index.cjs

dist/index.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21967,7 +21967,7 @@ var require_validation = __commonJS({
2196721967
return core2.setFailed(`Could not find artifact \xAB${artifact}\xBB`);
2196821968
}
2196921969
};
21970-
var verifyArcHost2 = ({ core: core2, apiHostname }) => apiHostname.match(/^[a-z0-9_.-]+?\.arcpublishing\.(net|com)$/i) ? true : core2.setFailed(`Host name '${apiHostname}' is not valid.`) && process2.exit(-1);
21970+
var verifyArcHost2 = ({ core: core2, apiHostname }) => apiHostname.match(/^[a-z0-9_.-]+?\.arcpublishing\.(com)$/i) ? true : core2.setFailed(`Host name '${apiHostname}' is not valid.`) && process2.exit(-1);
2197121971
var verifyMinimumRunningVersions2 = ({ core: core2, minimumRunningVersions }) => minimumRunningVersions >= 1 && minimumRunningVersions <= 10 ? true : core2.setFailed(
2197221972
`Minimum running versions '${minimumRunningVersions}' is not valid. Must be between 1 and 10.`
2197321973
);

package-lock.json

Lines changed: 67 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
"homepage": "https://github.com/arcxp/deploy-action#readme",
2828
"devDependencies": {
2929
"@jest/globals": "^29.7.0",
30-
"@types/jest": "^29.5.7",
31-
"@types/node": "^20.8.10",
30+
"@types/jest": "^29.5.8",
31+
"@types/node": "^20.9.0",
3232
"esbuild": "^0.19.5",
3333
"eslint": "^8.53.0",
3434
"eslint-config-standard": "^17.1.0",
3535
"eslint-plugin-import": "^2.29.0",
36-
"eslint-plugin-n": "^16.2.0",
36+
"eslint-plugin-n": "^16.3.1",
3737
"eslint-plugin-promise": "^6.1.1",
3838
"jest": "^29.7.0",
39-
"prettier": "^3.0.3"
39+
"prettier": "^3.1.0"
4040
},
4141
"dependencies": {
4242
"@actions/core": "^1.10.1",

src/validation.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const verifyArtifact = async ({ core, artifact }) => {
1414
}
1515

1616
const verifyArcHost = ({ core, apiHostname }) =>
17-
apiHostname.match(/^[a-z0-9_.-]+?\.arcpublishing\.(net|com)$/i)
17+
apiHostname.match(/^[a-z0-9_.-]+?\.arcpublishing\.(com)$/i)
1818
? true
1919
: core.setFailed(`Host name '${apiHostname}' is not valid.`) &&
2020
process.exit(-1)

0 commit comments

Comments
 (0)