File tree 2 files changed +4728
-0
lines changed
2 files changed +4728
-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
+ pwd
34
+ cp api-docs.md /docs/docs/13-skiperator/04-api-docs.md # Update path as needed
35
+
36
+ # Step 5: Push the changes to the target branch
37
+ - name : Commit and push changes
38
+ run : |
39
+ git config --global user.email "[email protected] "
40
+ git config --global user.name "GithubActions"
41
+ git add .
42
+ git commit -m "Update output.md"
43
+ git push origin test
You can’t perform that action at this time.
0 commit comments