diff --git a/.github/workflows/provider-updoc.yml b/.github/workflows/provider-updoc.yml index a586fdf..deffcc9 100644 --- a/.github/workflows/provider-updoc.yml +++ b/.github/workflows/provider-updoc.yml @@ -13,13 +13,15 @@ on: default: '1.20' required: false type: string + updoc-version: + description: 'updoc version to use while publishing the documentation' + default: '21481764' + required: false + type: string secrets: UPBOUND_CI_PROD_BUCKET_SA: required: true -env: - UPTEST_VERSION: "83bd901" - jobs: publish-docs: runs-on: ubuntu-22.04 @@ -78,7 +80,7 @@ jobs: DOCS_DIR="./docs/family" fi echo "Publishing Docs for ${PROVIDER_PACKAGE_NAME}, ${{ env.VER_MAJOR_MINOR }} from $DOCS_DIR" - go run github.com/upbound/uptest/cmd/updoc@${{ env.UPTEST_VERSION }} upload --docs-dir="${DOCS_DIR}" --name="${PROVIDER_PACKAGE_NAME}" --version=${{ env.VER_MAJOR_MINOR }} --bucket-name=bucket-marketplace-docs-production --cdn-domain=https://user-content.upbound.io + go run github.com/upbound/uptest/cmd/updoc@${{ inputs.updoc-version }} upload --docs-dir="${DOCS_DIR}" --name="${PROVIDER_PACKAGE_NAME}" --version=${{ env.VER_MAJOR_MINOR }} --bucket-name=bucket-marketplace-docs-production --cdn-domain=https://user-content.upbound.io done else echo "This job can only be run on release branches" diff --git a/internal/updoc/upload.go b/internal/updoc/upload.go index 779c1dc..c88cdc9 100644 --- a/internal/updoc/upload.go +++ b/internal/updoc/upload.go @@ -119,6 +119,9 @@ func (u *UploadManager) getIndex(afs afero.Fs, dir string, meta map[string]strin func (u *UploadManager) getMeta(ctx context.Context, bucket *storage.BucketHandle, cdn string, afs afero.Fs, dir string) (map[string]string, error) { meta := make(map[string]string) if err := afero.Walk(afs, dir, func(p string, info os.FileInfo, err error) error { + if err != nil { + return err + } if !info.IsDir() { if info.Name() == indexFN || info.Name() == sectionFN { return nil