-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some other update
- Loading branch information
Showing
59 changed files
with
1,314 additions
and
431 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 |
---|---|---|
|
@@ -11,50 +11,87 @@ on: | |
paths: | ||
- .github/workflows/Documentation.yaml | ||
- ADPhotoKit/Classes/**.swift | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
env: | ||
PACKAGE_NAME: ADPhotoKit | ||
BUILD_DEST: generic/platform=iOS | ||
BUILD_PRODUCT: Debug-iphoneos | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
generate-docc: | ||
name: Build DocC Archives | ||
runs-on: macos-13 | ||
steps: | ||
- name: Checkout | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
- name: Install Homebrew | ||
run: | | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -y | ||
(echo; echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"') >> /home/runner/.bashrc | ||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | ||
- name: Install swift-doc | ||
- name: Switch Xcode 🔄 | ||
run: sudo xcode-select --switch /Applications/Xcode_15.0.app | ||
- name: Generate DocC Archive 🪄 | ||
run: xcodebuild -workspace .swiftpm/xcode/package.xcworkspace docbuild -scheme ${{ env.PACKAGE_NAME }} -derivedDataPath /tmp/docbuild -destination ${{ env.BUILD_DEST }} | ||
- name: Zip It Up 🤐 | ||
run: | | ||
/home/linuxbrew/.linuxbrew/bin/brew install swiftdocorg/formulae/swift-doc | ||
- name: Generate Documentation | ||
mv /tmp/docbuild/Build/Products/${{ env.BUILD_PRODUCT }}/${{ env.PACKAGE_NAME }}.doccarchive ${{ env.PACKAGE_NAME }}.doccarchive | ||
zip -r ${{ env.PACKAGE_NAME }}.doccarchive.zip ${{ env.PACKAGE_NAME }}.doccarchive | ||
- name: Upload DocC Artifact ⬆️ | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.PACKAGE_NAME }}.doccarchive.zip | ||
path: ${{ env.PACKAGE_NAME }}.doccarchive.zip | ||
- name: Upload DocC Archive to GitHub release ⬆️ | ||
if: github.event.release | ||
uses: svenstaro/[email protected] | ||
with: | ||
file: ${{ env.PACKAGE_NAME }}.doccarchive.zip | ||
asset_name: ${{ env.PACKAGE_NAME }}.doccarchive.zip | ||
tag: ${{ github.ref_name }} | ||
publish: | ||
name: Publish Documentation Site 🛜 | ||
# if: github.event.release.prerelease == false && github.event.release.draft == false && github.event.release.tag_name == github.event.repository.default_branch | ||
runs-on: macos-13 | ||
needs: generate-docc | ||
steps: | ||
- name: Download DocC Archive ⬇️ | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ env.PACKAGE_NAME }}.doccarchive.zip | ||
- name: Unzip Archive 😮 | ||
run: | | ||
swift doc generate ADPhotoKit/Classes --module-name ADPhotoKit --output Wiki | ||
- name: Upload Documentation to Wiki | ||
uses: SwiftDocOrg/github-wiki-publish-action@v1 | ||
unzip ${{ env.PACKAGE_NAME }}.doccarchive.zip | ||
ls -li ${{ env.PACKAGE_NAME }}.doccarchive | ||
- name: lowercase Package Name 🔤 | ||
id: package-name | ||
uses: vishalmamidi/lowercase-action@v1 | ||
with: | ||
path: "Wiki" | ||
env: | ||
GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | ||
|
||
- name: Generate Documentation | ||
string: ${{ env.PACKAGE_NAME }} | ||
- name: Build Static Website 🎈 | ||
run: | | ||
swift doc generate ADPhotoKit/Classes \ | ||
--module-name ADPhotoKit \ | ||
--output Documentation \ | ||
--format html \ | ||
--base-url https://duzexu.github.io/ADPhotoKit/ | ||
- name: Permissions | ||
run: sudo chown -R $USER:$USER /home/runner/work/ | ||
|
||
$(xcrun --find docc) process-archive \ | ||
transform-for-static-hosting ${{ env.PACKAGE_NAME }}.doccarchive \ | ||
--hosting-base-path ${{ github.event.repository.name }} \ | ||
--output-path docs | ||
echo "<script>window.location.href += \"/documentation/${{ steps.package-name.outputs.lowercase }}\"</script>" > docs/index.html | ||
- name: Upload artifact ⬆️ | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: 'docs' | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} | ||
publish_dir: Documentation | ||
enable_jekyll: true | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: 'docs' | ||
# - name: Deploy to GitHub Pages 📑 | ||
# id: deployment | ||
# uses: actions/deploy-pages@v2 |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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
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
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
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
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
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
Oops, something went wrong.