ember-learn / ember-learn/ember-cli-addon-docs

Allow working out of the box on CI jobs with Github Actions

Ouverte
#437 0 commentaires 3 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
172
Forks
142
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Currently, if you run on Travis and leave `addon-docs.js` empty it will just work because it [falls back to `process.env.TRAVIS_BRANCH`](https://github.com/ember-learn/ember-cli-addon-docs/blob/731830a208e6a36562a4639867439649720a032a/lib/config.js#L32) to grab the correct `getVersionPath`

We should allow the same fallback behavior for Github Actions.

If, when using Github Actions, you don't explicitly set you `getVersionPath()` or `ADDON_DOCS_VERSION_PATH` you would get error:

```
Run yarn ember deploy production
yarn run v1.19.2
$ /home/runner/work/ember-transformicons/ember-transformicons/node_modules/.bin/ember deploy production
no addon-docs version path configured; skipping deploy
undefinedPipeline aborted
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
##[error]Process completed with exit code 1.
```

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez dans lib/config.js, au niveau du fallback existant de process.env.TRAVIS_BRANCH. Examinez comment GitHub Actions expose le nom de la branche et comment addon-docs.js et ADDON_DOCS_VERSION_PATH sont gérés. C’est terminé lorsqu’un addon-docs.js vide peut être déployé depuis GitHub Actions sans signaler qu’aucun chemin de version n’est configuré.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
github-actions, javascript
Domaine
ci-cd, devops
Type d'issue
Fonctionnalité
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
55/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.