Skip to content

Add github action for docs #15

Add github action for docs

Add github action for docs #15

Workflow file for this run

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: |
pwd
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
ls
- 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: |
pwd
ls
cp api-docs.md docs/docs/13-skiperator/04-api-docs.md
- name: Commit and push changes
run: |
ls
pwd
cd docs
ls
ls -l docs/13-skiperator
git config --global user.email "skiperator@kartverket.no"
git config --global user.name "GithubActions"
git add .
git commit -m "Update output.md"
git push origin test