|
| 1 | +name: build-documentation |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + workflow_call: |
| 5 | +jobs: |
| 6 | + build-docc: |
| 7 | + runs-on: [self-hosted, macOS] |
| 8 | + steps: |
| 9 | + - name: Checkout repository |
| 10 | + uses: actions/checkout@v3 |
| 11 | + - name: Build Documentation |
| 12 | + run: exec ./.github/scripts/build-docc.sh |
| 13 | + - name: Init new repo in dist folder and commit generated files |
| 14 | + run: | |
| 15 | + cd docs |
| 16 | + git init |
| 17 | + git config http.postBuffer 524288000 |
| 18 | + git add -A |
| 19 | + git config --local user.email "[email protected]" |
| 20 | + git config --local user.name "GitHub Action" |
| 21 | + git commit -m 'deploy' |
| 22 | + |
| 23 | + - name: Force push to destination branch |
| 24 | + |
| 25 | + with: |
| 26 | + github_token: ${{ secrets.GITHUB_TOKEN }} |
| 27 | + branch: docs |
| 28 | + force: true |
| 29 | + directory: ./docs |
| 30 | + |
| 31 | + ############################ |
| 32 | + ##### IMPORTANT NOTICE ##### |
| 33 | + ############################ |
| 34 | + # This was used to build the documentation catalog until |
| 35 | + # it didn't produce the 'documentation' directory anymore. |
| 36 | + # |
| 37 | + |
| 38 | + # with: |
| 39 | + # target: CodeEditTextView |
| 40 | + # output: ./docs |
| 41 | + # hosting-base-path: CodeEditTextView |
| 42 | + # disable-indexing: 'true' |
| 43 | + # transform-for-static-hosting: 'true' |
| 44 | + # |
| 45 | + # The command that this plugin uses is: |
| 46 | + # |
| 47 | + # swift package --allow-writing-to-directory ./docs generate-documentation \ |
| 48 | + # --target CodeEditTextView |
| 49 | + # --output-path ./docs |
| 50 | + # --hosting-base-path CodeEditTextView |
| 51 | + # --disable-indexing |
| 52 | + # --transform-for-static-hosting |
| 53 | + # |
| 54 | + # We now use xcodebuild to build the documentation catalog instead. |
| 55 | + # |
0 commit comments