Always build cli-docs (#1435)

## Description

We need cli docs to be available to be able to be able to build docs.

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [x] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* https://github.com/alcionai/corso/pull/1434

## Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
Abin Simon 2022-11-03 12:44:37 +05:30 committed by GitHub
parent 47e7172e39
commit f69284acea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,20 +89,17 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup Golang with cache - name: Setup Golang with cache
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || needs.precheck.outputs.srcfileschanged == 'true'
uses: magnetikonline/action-golang-cache@v3 uses: magnetikonline/action-golang-cache@v3
with: with:
go-version-file: src/go.mod go-version-file: src/go.mod
- name: Generate CLI Docs - name: Generate CLI Docs
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || needs.precheck.outputs.srcfileschanged == 'true'
working-directory: ./src working-directory: ./src
run: | run: |
go run ./cmd/mdgen/mdgen.go generate go run ./cmd/mdgen/mdgen.go generate
# migrate generated md files into /docs/docs/cli # migrate generated md files into /docs/docs/cli
- name: Move CLI .md to Docs - name: Move CLI .md to Docs
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' || needs.precheck.outputs.srcfileschanged == 'true'
run: | run: |
mkdir -p ./docs/docs/cli mkdir -p ./docs/docs/cli
mv ./src/cmd/mdgen/cli_markdown/* ./docs/docs/cli/ mv ./src/cmd/mdgen/cli_markdown/* ./docs/docs/cli/
@ -130,8 +127,6 @@ jobs:
npm run build npm run build
- uses: actions/upload-artifact@master - uses: actions/upload-artifact@master
# uncomment next line to disable creating docs artifacts on PR runs
# if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
name: Upload docs as artifacts name: Upload docs as artifacts
with: with:
name: docs name: docs