Skip to content

Commit

Permalink
doc: pass bin as artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed May 7, 2022
1 parent f0a937a commit 99ceda3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
5 changes: 2 additions & 3 deletions .github/macros.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ scriptdir=$(dirname $(readlink -f $0))
echo "# Macros"
echo

grep -A1000 macroDescriptions $scriptdir/../cmd/carapace/cmd/macros.go \
| grep "\t" \
| sed 's_^\t"\([^"]*\.\)\([^. ]\+\)": \+"\(.*\)",$_- [\1\2]\(https://pkg.go.dev/github.com/rsteube/carapace-bin/pkg/actions/\1#Action\2) \3_' \
$scriptdir/../cmd/carapace/carapace --macros \
| sed 's_^\([^ ]*\.\)\([^. ]\+\) \+\(.*\)_- [\1\2]\(https://pkg.go.dev/github.com/rsteube/carapace-bin/pkg/actions/\1#Action\2) \3_' \
| sed -e ':loop' -e 's_\(carapace-bin/pkg/actions/[^#]*\)[.]_\1/_' -e 't loop'
15 changes: 13 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@ jobs:
- name: Generate
run: go generate ./cmd/...


- name: Build
run: go build -v ./cmd/...
run: ls cmd/ | xargs -I'{}' sh -c "cd ./cmd/{} && go build -v ."

- uses: actions/upload-artifact@v2
with:
name: carapace
path: ./cmd/carapace/carapace

- name: Test
run: go test -v ./cmd/...
Expand Down Expand Up @@ -58,15 +62,22 @@ jobs:
doc:
runs-on: ubuntu-latest
container: ghcr.io/rsteube/carapace
needs: build
steps:
- uses: actions/checkout@v2

- uses: actions/download-artifact@v2
with:
name: carapace

- name: "build docs"
run: |
sed -i 's/\[output.linkcheck\]/#[output.linkcheck]/' docs/book.toml
sh .github/completers.sh > docs/src/completers.md
sh .github/macros.sh > docs/src/specs/macros.md
mdbook build docs
sh .github/badge.sh > docs/book/badge.svg
- name: "push gh-pages"
if: github.ref == 'refs/heads/master'
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
cmd/carafmt/carafmt
cmd/caralint/caralint
cmd/carapace/carapace
cmd/carapace/cmd/completers.go
cmd/carapace/cmd/completers_release.go
cmd/carapace/cmd/macros.go
cmd/caraparse/caraparse
cmd/generate/generate
completers/*/*_completer
completers/gh_completer/cmd/action/api.git.luolix.top.json
completers_release
Expand Down

0 comments on commit 99ceda3

Please sign in to comment.