Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
docs: versioning (#455)
Browse files Browse the repository at this point in the history
* docs: versioning

* update label

* reorder

* try fix

* try fix 2

* try fix

* reorder steps

* add docs folder to check

* *
  • Loading branch information
fedekunze authored Aug 18, 2021
1 parent f34e9b5 commit 1b95d06
Show file tree
Hide file tree
Showing 7 changed files with 8,030 additions and 7,850 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Docs build
# This workflow runs when a PR is labeled with `docs`
# This will check if the docs build successfully by running `npm run build`
on:
pull_request:
push:
branches:
- main
- release/*

jobs:
check-docs-build:
name: Check docs build
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
persist-credentials: false
fetch-depth: 0
- uses: technote-space/get-diff-action@v5
id: git_diff
with:
PATTERNS: |
docs/*
SUFFIX_FILTER: |
.md
- name: Install dependencies and build docs 🧱
run: |
make build-docs
30 changes: 30 additions & 0 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Protobuf
# Protobuf runs buf (https://buf.build/) lint and check-breakage
# This workflow is only run when a .proto file has been changed
on:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@master
- uses: technote-space/get-diff-action@v5
with:
PATTERNS: |
**/**.proto
- name: lint
run: make proto-lint
if: env.GIT_DIFF
breakage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: technote-space/get-diff-action@v5
with:
PATTERNS: |
**/**.proto
- name: check-breakage
run: make proto-check-breaking
if: env.GIT_DIFF
21 changes: 16 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -271,16 +271,27 @@ docs-serve:
yarn && \
yarn run serve

# This builds a docs site for each branch/tag in `./docs/versions`
# and copies each site to a version prefixed path. The last entry inside
# the `versions` file will be the default root index.html.
build-docs:
# Build the site into docs/.vuepress/dist
build-docs:
@$(MAKE) docs-tools-stamp && \
cd docs && \
yarn && \
yarn run build
.PHONY: docs-serve build-docs

# This builds a docs site for each branch/tag in `./docs/versions`
# and copies each site to a version prefixed path. The last entry inside
# the `versions` file will be the default root index.html.
build-docs-versioned:
@$(MAKE) docs-tools-stamp && \
cd docs && \
while read -r branch path_prefix; do \
(git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \
mkdir -p ~/output/$${path_prefix} ; \
cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \
cp ~/output/$${path_prefix}/index.html ~/output ; \
done < versions ;

.PHONY: docs-serve build-docs build-docs-versioned

###############################################################################
### Tests & Simulation ###
Expand Down
4 changes: 4 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ module.exports = {
{
"label": "main",
"key": "main"
},
{
"label": "v0.5",
"key": "v0.5"
}
],
}
Expand Down
46 changes: 46 additions & 0 deletions docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/versions
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
release/v0.5.x v0.5
main main
Loading

0 comments on commit 1b95d06

Please sign in to comment.