-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c1872bc
Showing
3 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2021 Paul Schmiedmayer | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# docc2ghpages | ||
|
||
Generates a DocC documentation, creates static HTML pages using docc2html, and deploys it to the gh-pagges branch | ||
|
||
## Usage | ||
|
||
<!-- start usage --> | ||
```yaml | ||
- uses: DoccZz/docc2html@v2 | ||
with: | ||
# The name of the scheme that the documentation should be generated for passed to xcodebuild. | ||
scheme: '' | ||
|
||
# The personal access token (PAT) used to push to the gh-pages branch. | ||
# | ||
# Default: ${{ github.token }} | ||
token: '' | ||
|
||
# The destination the schme can be build for passed to xcodebuild. | ||
# | ||
# Default: platform=macOS | ||
destination: '' | ||
``` | ||
<!-- end usage --> | ||
## License | ||
The scripts and documentation in this project are released under the [MIT License](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: 'docc2ghpages' | ||
description: 'Generates a DocC documentation, creates static HTML pages using docc2html, and deploys it to the gh-pagges branch' | ||
inputs: | ||
scheme: | ||
description: 'The name of the scheme that the documentation should be generated for passed to xcodebuild' | ||
required: true | ||
token: | ||
description: 'The personal access token (PAT) used to push to the gh-pages branch.' | ||
required: true | ||
default: ${{ github.token }} | ||
destination: | ||
description: 'The destination the schme can be build for passed to xcodebuild.' | ||
required: true | ||
default: 'platform=macOS' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: maxim-lobanov/setup-xcode@v1.2.3 | ||
with: | ||
xcode-version: latest | ||
- run: xcodebuild -version | ||
shell: bash | ||
- run: swift --version | ||
shell: bash | ||
- run: | | ||
xcodebuild docbuild -scheme ${{ inputs.scheme }} -destination ${{ inputs.destination }} -derivedDataPath ./.xcodebuild | ||
cp -r $(find ./.xcodebuild -type d -name '${{ inputs.scheme }}.doccarchive') ./${{ inputs.scheme }}.doccarchive | ||
echo "The DocC archive can be found at ./${{ inputs.scheme }}.doccarchive" | ||
shell: bash | ||
- run: | | ||
git clone https://github.com/DoccZz/docc2html.git | ||
cd docc2html | ||
git checkout $(git describe --tags `git rev-list --tags --max-count=1`) | ||
swift run docc2html ../${{ inputs.scheme }}.doccarchive ../docs | ||
shell: bash | ||
- uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ inputs.token }} | ||
publish_dir: ./docs | ||
force_orphan: true |