Skip to content

Commit f14649d

Browse files
author
Jon Tiritilli
committed
docs(README.md): update documentation with new examples and clarify usage
Add a new "Merge to Main" example for GitHub Actions. Clarify the working directory parameter and its common patterns. Improve descriptions for manifest fields and common issues. Remove redundant sections to streamline the document. docs: add MIT license file Add a LICENSE file with the MIT License to clarify the project's licensing terms and ensure legal compliance. style(dist/index.js): add trailing commas for consistency Add trailing commas to module exports for consistency with code style guidelines and improve readability. chore(package.json): update description and author information Update the package description to better reflect its purpose. Change the author field to "Domo Developer Innovations" for accuracy.
1 parent 5e075b9 commit f14649d

4 files changed

Lines changed: 101 additions & 60 deletions

File tree

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Domo, Inc.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 57 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A GitHub Action for deploying Domo apps from GitHub to a Domo instance using the
66

77
- 🔐 **Token-based Authentication**: Secure authentication using Domo API tokens
88
- 🔨 **Optional Build Step**: Run custom build commands before deployment
9-
- 📦 **Automatic ryuu Installation**: Installs the ryuu package globally (provides `domo` CLI) if not present
9+
- 📦 **Automatic Ryuu Installation**: Installs the ryuu package globally (provides `domo` CLI) if not present
1010
-**Comprehensive Error Handling**: Detailed error messages and status reporting
1111
- 🚀 **Easy Integration**: Simple setup with minimal configuration
1212

@@ -34,6 +34,33 @@ jobs:
3434
domo-instance: https://your-company.domo.com
3535
```
3636
37+
### Merge to Main Example
38+
39+
```yaml
40+
name: Deploy on Merge to Main
41+
on:
42+
pull_request:
43+
types: [closed]
44+
branches: [main]
45+
46+
jobs:
47+
deploy:
48+
runs-on: ubuntu-latest
49+
# Only run when PR is actually merged (not just closed)
50+
if: github.event.pull_request.merged == true
51+
steps:
52+
- name: Checkout code
53+
uses: actions/checkout@v4
54+
55+
- name: Deploy to Domo
56+
uses: DomoApps/domoapps-publish-action@v1
57+
with:
58+
domo-token: ${{ secrets.DOMO_ACCESS_TOKEN }}
59+
domo-instance: https://your-company.domo.com
60+
build-command: npm run build
61+
working-directory: ./build
62+
```
63+
3764
### With Build Command
3865
3966
```yaml
@@ -55,7 +82,7 @@ jobs:
5582
domo-token: ${{ secrets.DOMO_ACCESS_TOKEN }}
5683
domo-instance: https://your-company.domo.com
5784
build-command: npm run build
58-
working-directory: ./my-domo-app
85+
working-directory: ./dist
5986
```
6087
6188
## Inputs
@@ -65,7 +92,7 @@ jobs:
6592
| `domo-token` | Domo API token for authentication | ✅ | - |
6693
| `domo-instance` | Domo instance URL (e.g., `https://your-company.domo.com`) | ✅ | - |
6794
| `build-command` | Optional build command to run before deployment | ❌ | - |
68-
| `working-directory` | Working directory for the action | ❌ | `.` |
95+
| `working-directory` | Build output directory containing the Domo app files | ❌ | `.` |
6996

7097
## Outputs
7198

@@ -135,17 +162,14 @@ Here's the minimal manifest structure required for Domo app deployment:
135162

136163
### Manifest Field Descriptions
137164

138-
| Field | Required | Description |
139-
| --------------------- | -------- | -------------------------------------------------------- |
140-
| `name` | ✅ | Display name of your app |
141-
| `version` | ✅ | Semantic version (e.g., "1.0.0") |
142-
| `size.width` | ✅ | App width in pixels |
143-
| `size.height` | ✅ | App height in pixels |
144-
| `id` | ✅ | Unique app identifier (UUID format) |
145-
| `mapping` | ✅ | Array of dataset mappings |
146-
| `mapping[].dataSetId` | ✅ | Dataset ID to connect to your app |
147-
| `mapping[].alias` | ✅ | Alias name for the dataset in your app |
148-
| `mapping[].fields` | ❌ | Array of specific fields to include (empty = all fields) |
165+
| Field | Required | Description |
166+
| ------------- | -------- | ----------------------------------- |
167+
| `name` | ✅ | Display name of your app |
168+
| `version` | ✅ | Semantic version (e.g., "1.0.0") |
169+
| `size.width` | ✅ | App width in pixels |
170+
| `size.height` | ✅ | App height in pixels |
171+
| `id` | ✅ | Unique app identifier (UUID format) |
172+
| `mapping` | ✅ | Array of dataset mappings |
149173

150174
### Common Manifest Issues
151175

@@ -166,16 +190,6 @@ The Design ID is automatically generated by Domo when you create an app. You can
166190
3. Look for "Design Id:" in the app details section
167191
4. Copy the UUID (e.g., `f46a7a19-9237-41f5-9850-ef453e181614`)
168192

169-
#### Dataset ID
170-
171-
Find your dataset ID in Domo:
172-
173-
1. Go to your dataset in Domo
174-
2. Look at the URL: `https://your-company.domo.com/datasources/overview/{dataset-id}`
175-
3. Copy the dataset ID from the URL
176-
177-
This will help catch common issues before deployment.
178-
179193
## Advanced Usage
180194

181195
### Multiple Environments
@@ -239,14 +253,25 @@ jobs:
239253
run: npm ci
240254
241255
- name: Deploy to Domo
242-
uses: DomoApps/domoapps-publish-action@v1
256+
uses: DomoApps/domoapps-publish-action@latest
243257
with:
244258
domo-token: ${{ secrets.DOMO_ACCESS_TOKEN }}
245259
domo-instance: https://your-company.domo.com
246260
build-command: npm run build
247-
working-directory: .
261+
working-directory: ./build
248262
```
249263

264+
## Working Directory
265+
266+
The `working-directory` parameter should point to the **build output directory** containing your compiled Domo app files (typically `./build`, `./dist`, or `./out`). This is where your build process outputs the final Domo app files that will be deployed.
267+
268+
**Common patterns:**
269+
270+
- `./build` - Most common build output directory
271+
- `./dist` - Alternative build output directory
272+
- `./out` - Another common build output directory
273+
- `.` - Only use if your app files are in the repository root, such as **ProCode apps**
274+
250275
## How It Works
251276

252277
The action uses the `ryuu` npm package (which provides the `domo` CLI command) to deploy Domo apps. The authentication process follows these steps:
@@ -262,31 +287,25 @@ The action automatically handles the instance name extraction from the full Domo
262287
### Common Issues
263288

264289
1. **Authentication Failed**
265-
266290
- Verify your Domo token is correct and has proper permissions
267291
- Check that the Domo instance URL is correct
268292

269-
2. **Build Command Failed**
270-
293+
1. **Build Command Failed**
271294
- Ensure the build command is valid for your environment
272295
- Check that all required dependencies are installed
273296

274-
3. **Manifest Not Found**
297+
1. **Manifest Not Found**
275298
- Ensure the working directory contains a valid `manifest.json`
276299
- Verify the manifest has the correct `id` field for your Domo asset
277300

301+
1. **Manifest Errors**
302+
- Verify required fields are present
303+
- Ensure there are no blank spaces (' ') in the field aliases
304+
278305
### Debug Mode
279306

280307
To enable debug logging, set the `ACTIONS_STEP_DEBUG` secret to `true` in your repository settings.
281308

282-
## Contributing
283-
284-
1. Fork the repository
285-
2. Create a feature branch
286-
3. Make your changes
287-
4. Add tests for new functionality
288-
5. Submit a pull request
289-
290309
## License
291310

292311
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

dist/index.js

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25658,7 +25658,7 @@ async function authenticateDomo(domoToken, domoInstance) {
2565825658
}
2565925659

2566025660
module.exports = {
25661-
authenticateDomo
25661+
authenticateDomo,
2566225662
};
2566325663

2566425664

@@ -25681,7 +25681,7 @@ function changeDirectory(workingDirectory) {
2568125681
}
2568225682

2568325683
module.exports = {
25684-
changeDirectory
25684+
changeDirectory,
2568525685
};
2568625686

2568725687

@@ -25702,7 +25702,7 @@ async function publishAppStep(appPath, domoInstance) {
2570225702
}
2570325703

2570425704
module.exports = {
25705-
publishAppStep
25705+
publishAppStep,
2570625706
};
2570725707

2570825708

@@ -25734,7 +25734,7 @@ async function runBuild(buildCommand) {
2573425734
}
2573525735

2573625736
module.exports = {
25737-
runBuild
25737+
runBuild,
2573825738
};
2573925739

2574025740

@@ -25743,7 +25743,10 @@ module.exports = {
2574325743
/***/ 4015:
2574425744
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
2574525745

25746-
const { ensurePackageManager, installDependencies } = __nccwpck_require__(9260);
25746+
const {
25747+
ensurePackageManager,
25748+
installDependencies,
25749+
} = __nccwpck_require__(9260);
2574725750
const { ensureRyuuInstalled } = __nccwpck_require__(6313);
2574825751

2574925752
/**
@@ -25761,7 +25764,7 @@ async function setupEnvironment() {
2576125764
}
2576225765

2576325766
module.exports = {
25764-
setupEnvironment
25767+
setupEnvironment,
2576525768
};
2576625769

2576725770

@@ -25794,7 +25797,7 @@ function validateInputs(domoToken, domoInstance) {
2579425797
}
2579525798

2579625799
module.exports = {
25797-
validateInputs
25800+
validateInputs,
2579825801
};
2579925802

2580025803

@@ -25812,9 +25815,7 @@ const core = __nccwpck_require__(7484);
2581225815
* @returns {string} The instance name
2581325816
*/
2581425817
function extractInstanceName(domoInstance) {
25815-
return domoInstance
25816-
.replace(/^https?:\/\//, '')
25817-
.replace(/\/$/, '');
25818+
return domoInstance.replace(/^https?:\/\//, '').replace(/\/$/, '');
2581825819
}
2581925820

2582025821
/**
@@ -25839,9 +25840,9 @@ async function ensureRyuuInstalled() {
2583925840
*/
2584025841
async function authenticateWithDomo(domoToken, domoInstance) {
2584125842
core.info('🔐 Adding Domo token and authenticating...');
25842-
25843+
2584325844
const instanceName = extractInstanceName(domoInstance);
25844-
25845+
2584525846
// Add token to domo CLI
2584625847
const addTokenCommand = `domo token -i ${instanceName} -t ${domoToken} add`;
2584725848
await exec.exec('bash', ['-c', addTokenCommand]);
@@ -25860,11 +25861,11 @@ async function authenticateWithDomo(domoToken, domoInstance) {
2586025861
*/
2586125862
async function publishApp(appPath, domoInstance) {
2586225863
core.info('📤 Publishing app to Domo...');
25863-
25864+
2586425865
const publishCommand = `domo publish "${appPath}"`;
2586525866
await exec.exec('bash', ['-c', publishCommand]);
2586625867
core.info('✅ App published successfully');
25867-
25868+
2586825869
// Set outputs
2586925870
core.setOutput('deployment-status', 'success');
2587025871
core.setOutput('app-url', `${domoInstance}/app/${appPath}`);
@@ -25874,7 +25875,7 @@ module.exports = {
2587425875
extractInstanceName,
2587525876
ensureRyuuInstalled,
2587625877
authenticateWithDomo,
25877-
publishApp
25878+
publishApp,
2587825879
};
2587925880

2588025881

@@ -25908,7 +25909,7 @@ function detectPackageManager() {
2590825909
async function ensurePackageManager() {
2590925910
try {
2591025911
const packageManager = detectPackageManager();
25911-
25912+
2591225913
if (packageManager === 'pnpm') {
2591325914
core.info('📦 Detected pnpm lock file, ensuring pnpm is available...');
2591425915
try {
@@ -25932,7 +25933,7 @@ async function ensurePackageManager() {
2593225933
} else {
2593325934
core.info('📦 Using npm (default package manager)');
2593425935
}
25935-
25936+
2593625937
return packageManager;
2593725938
} catch (error) {
2593825939
core.warning(`⚠️ Could not detect package manager: ${error.message}`);
@@ -25959,7 +25960,7 @@ async function installDependencies() {
2595925960

2596025961
const packageManager = detectPackageManager();
2596125962
core.info('📦 Installing dependencies...');
25962-
25963+
2596325964
if (packageManager === 'pnpm') {
2596425965
await exec.exec('pnpm', ['install', '--frozen-lockfile']);
2596525966
} else if (packageManager === 'yarn') {
@@ -25971,7 +25972,7 @@ async function installDependencies() {
2597125972
await exec.exec('npm', ['install']);
2597225973
}
2597325974
}
25974-
25975+
2597525976
core.info('✅ Dependencies installed successfully');
2597625977
} catch (error) {
2597725978
core.warning(`⚠️ Could not install dependencies: ${error.message}`);
@@ -25981,7 +25982,7 @@ async function installDependencies() {
2598125982
module.exports = {
2598225983
detectPackageManager,
2598325984
ensurePackageManager,
25984-
installDependencies
25985+
installDependencies,
2598525986
};
2598625987

2598725988

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "domo-publish-action",
33
"version": "1.0.0",
4-
"description": "GitHub Action for deploying Domo apps using domo CLI",
4+
"description": "GitHub Action for deploying Domo apps to Domo instances",
55
"main": "dist/index.js",
66
"scripts": {
77
"build": "ncc build src/index.js -o dist",
@@ -16,7 +16,7 @@
1616
"deployment",
1717
"domo-cli"
1818
],
19-
"author": "Your Name",
19+
"author": "Domo Developer Innovations",
2020
"license": "MIT",
2121
"dependencies": {
2222
"@actions/core": "^1.10.0",

0 commit comments

Comments
 (0)