Skip to content

Commit

Permalink
Add github action for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
martinhny committed Sep 10, 2024
1 parent ab2657e commit 57139aa
Show file tree
Hide file tree
Showing 3 changed files with 4,730 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/api-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: write api-docs to skip.kartverket.no

on:
push:

jobs:
run-crdoc:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: skiperator

- name: Run crdoc Docker container
run: |
sudo docker run -u $(id -u):$(id -g) --rm -v $PWD:/workdir ghcr.io/fybrik/crdoc:latest --resources /workdir/skiperator/config/crd --output /workdir/api-docs.md
- name: Checkout target repository
uses: actions/checkout@v4
with:
path: docs
repository: kartverket/skip.kartverket.no
ref: test
ssh-key: ${{ secrets.SKIPDOCS_DEPLOY_KEY }}

- name: Copy generated output to target repo
run: |
cd ../../..
ls
pwd
cp api-docs.md docs/docs/13-skiperator/04-api-docs.md
- name: Commit and push changes
run: |
git config --global user.email "[email protected]"
git config --global user.name "GithubActions"
git add .
git commit -m "Update output.md"
git push origin test
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ on:
- samples/**
- README.md
- CONTRIBUTING.md
- .github/workflows/api-docs.yaml
push:
paths-ignore:
- doc/**
- samples/**
- README.md
- CONTRIBUTING.md
- .github/workflows/api-docs.yaml

jobs:
test:
Expand Down
Loading

0 comments on commit 57139aa

Please sign in to comment.