File tree 2 files changed +4724
-0
lines changed
2 files changed +4724
-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
+
16
+ - name : Run crdoc Docker container
17
+ run : |
18
+ sudo docker run -u $(id -u):$(id -g) --rm -v $PWD:/workdir ghcr.io/fybrik/crdoc:latest --resources /workdir/config/crd --output /workdir/api-docs.md
19
+
20
+ - name : Checkout target repository
21
+ uses : actions/checkout@v4
22
+ with :
23
+ repository : kartverket/skip.kartverket.no
24
+ ref : test
25
+ ssh-key : ${{ secrets.SKIPDOCS_DEPLOY_KEY }}
26
+ # Step 4: Copy output.md from the source repo to the target repo
27
+ - name : Copy generated output to target repo
28
+ run : |
29
+ ls ../skiperator
30
+ cp ../skiperator/api-docs.md /docs/13-skiperator/04-api-docs.md # Update path as needed
31
+
32
+ # Step 5: Push the changes to the target branch
33
+ - name : Commit and push changes
34
+ run : |
35
+ git config --global user.email "[email protected] "
36
+ git config --global user.name "GithubActions"
37
+ git add .
38
+ git commit -m "Update output.md"
39
+ git push origin test
You can’t perform that action at this time.
0 commit comments