diff --git a/src/build.js b/src/build.js index 0232c9f..1bd0e0d 100644 --- a/src/build.js +++ b/src/build.js @@ -1,5 +1,12 @@ 'use strict' +// Attempt to download GitLab job artifact and failover to GitHub if unsuccessful. +// In GitLab Pages, the latest job status will be marked as unknown/failed if the repo has newer commit. +// The link to download the latest job artifact will also be unavailable when that happens, +// unless manually queried through API. +// Instead of using the API, I find it easier to failover to GitHub. +// ref: https://gitlab.com/gitlab-org/gitlab/-/issues/29257 + const { stream: gotStream } = require('got') const got = require('got') const unzip = require('extract-zip')