File tree 3 files changed +4731
-0
lines changed
3 files changed +4731
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : write api-docs to skip.kartverket.no
2
+
3
+ on :
4
+ push :
5
+
6
+ jobs :
7
+ run-crdoc :
8
+ runs-on : ubuntu-latest
9
+ permissions :
10
+ contents : read
11
+ packages : write
12
+ steps :
13
+ - name : Checkout repository
14
+ uses : actions/checkout@v4
15
+ with :
16
+ path : skiperator
17
+
18
+ - name : Run crdoc Docker container
19
+ run : |
20
+ 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
21
+
22
+ - name : Checkout target repository
23
+ uses : actions/checkout@v4
24
+ with :
25
+ path : docs
26
+ repository : kartverket/skip.kartverket.no
27
+ ref : test
28
+ ssh-key : ${{ secrets.SKIPDOCS_DEPLOY_KEY }}
29
+ # Step 4: Copy output.md from the source repo to the target repo
30
+ - name : Copy generated output to target repo
31
+ run : |
32
+ ls ../../..
33
+ ls
34
+ pwd
35
+ cp api-docs.md /docs/docs/13-skiperator/04-api-docs.md # Update path as needed
36
+
37
+ # Step 5: Push the changes to the target branch
38
+ - name : Commit and push changes
39
+ run : |
40
+ git config --global user.email "[email protected] "
41
+ git config --global user.name "GithubActions"
42
+ git add .
43
+ git commit -m "Update output.md"
44
+ git push origin test
Original file line number Diff line number Diff line change 7
7
- samples/**
8
8
- README.md
9
9
- CONTRIBUTING.md
10
+ - .github/workflows/api-docs.yaml
10
11
push :
11
12
paths-ignore :
12
13
- doc/**
13
14
- samples/**
14
15
- README.md
15
16
- CONTRIBUTING.md
17
+ - .github/workflows/api-docs.yaml
16
18
17
19
jobs :
18
20
test :
You can’t perform that action at this time.
0 commit comments