* renames Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> updates Signed-off-by: Jess Frazelle <github@jessfraz.com> udpates Signed-off-by: Jess Frazelle <github@jessfraz.com> fix parse Signed-off-by: Jess Frazelle <github@jessfraz.com> fix typos Signed-off-by: Jess Frazelle <github@jessfraz.com> docs Signed-off-by: Jess Frazelle <github@jessfraz.com> update tests Signed-off-by: Jess Frazelle <github@jessfraz.com> empty * fix; Signed-off-by: Jess Frazelle <github@jessfraz.com> * new Signed-off-by: Jess Frazelle <github@jessfraz.com> * add the types pages Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * Look at this (photo)Graph *in the voice of Nickelback* * empty * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
68 lines
2.3 KiB
YAML
68 lines
2.3 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- .github/workflows/generate-website-docs.yml
|
|
- 'docs/**'
|
|
pull_request:
|
|
paths:
|
|
- .github/workflows/generate-website-docs.yml
|
|
workflow_dispatch:
|
|
name: generate-website-docs
|
|
concurrency:
|
|
group: docs-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
generate-website-docs:
|
|
name: generate-website-docs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/create-github-app-token@v1
|
|
id: app-token
|
|
with:
|
|
# required
|
|
app-id: ${{ secrets.GH_ORG_APP_ID }}
|
|
private-key: ${{ secrets.GH_ORG_APP_PRIVATE_KEY }}
|
|
owner: ${{ github.repository_owner }}
|
|
# Checkout the docs repo since we will want to update the files there.
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
repository: 'kittycad/documentation'
|
|
path: 'documentation'
|
|
token: ${{ steps.app-token.outputs.token }}
|
|
- name: move docs to docs
|
|
shell: bash
|
|
run: |
|
|
mkdir -p documentation/content/pages/docs/kcl/
|
|
# cleanup old
|
|
rm -rf documentation/content/pages/docs/kcl/*.md
|
|
rm -rf documentation/content/pages/docs/kcl/types
|
|
# move new
|
|
mv -f docs/kcl/*.md documentation/content/pages/docs/kcl/
|
|
mv -f docs/kcl/types documentation/content/pages/docs/kcl/
|
|
- name: commit the changes in the docs repo
|
|
shell: bash
|
|
run: |
|
|
cd documentation
|
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
git config --local user.name "github-actions[bot]"
|
|
git add .
|
|
git commit -am "YOYO NEW KCL DOCS!!" || exit 0
|
|
git fetch origin
|
|
git rebase origin/main || exit 0
|
|
export NEW_BRANCH="update-kcl-docs"
|
|
git checkout -b "$NEW_BRANCH"
|
|
git push -f origin "$NEW_BRANCH"
|
|
gh pr create --title "Update KCL docs" \
|
|
--body "Updating the generated kcl docs cc @jessfraz @franknoirot merge this" \
|
|
--head "$NEW_BRANCH" \
|
|
--reviewer jessfraz \
|
|
--reviewer irev-dev \
|
|
--reviewer franknoirot \
|
|
--base main || true
|
|
env:
|
|
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
|