From 586caa97295eefb837096fd78cb3a321583abda3 Mon Sep 17 00:00:00 2001 From: ZeXu Du Date: Sat, 3 Aug 2024 16:02:22 +0800 Subject: [PATCH 1/5] Update Documentation.yml --- .github/workflows/Documentation.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index cf515c6..5038ef1 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -23,6 +23,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Generate Documentation uses: SwiftDocOrg/swift-doc@master with: From c7e232227022873eeb09725570c304079fb8ef75 Mon Sep 17 00:00:00 2001 From: ZeXu Du Date: Sat, 3 Aug 2024 17:11:15 +0800 Subject: [PATCH 2/5] Update Documentation.yml --- .github/workflows/Documentation.yml | 33 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 5038ef1..26edd55 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -23,18 +23,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 + - name: Clone swift-doc + uses: actions/checkout@v3 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + repository: SwiftDocOrg/swift-doc + path: swift-doc + - name: Install swift-doc + run: | + cd swift-doc + make install - name: Generate Documentation - uses: SwiftDocOrg/swift-doc@master - with: - inputs: "ADPhotoKit/Classes" - module-name: "ADPhotoKit" - output: "Wiki" + run: | + swift doc generate ADPhotoKit/Classes --module-name ADPhotoKit --output Wiki - name: Upload Documentation to Wiki uses: SwiftDocOrg/github-wiki-publish-action@v1 with: @@ -43,13 +43,12 @@ jobs: GH_PERSONAL_ACCESS_TOKEN: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }} - name: Generate Documentation - uses: SwiftDocOrg/swift-doc@master - with: - inputs: "ADPhotoKit/Classes" - module-name: "ADPhotoKit" - output: "Documentation" - format: "html" - base-url: https://duzexu.github.io/ADPhotoKit/ + 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/ From d910ea32103f80030dbe6fb9a1e1c8fc9661b6f6 Mon Sep 17 00:00:00 2001 From: ZeXu Du Date: Sat, 3 Aug 2024 17:46:31 +0800 Subject: [PATCH 3/5] Update Documentation.yml --- .github/workflows/Documentation.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 26edd55..41151ff 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -23,15 +23,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: Clone swift-doc - uses: actions/checkout@v3 - with: - repository: SwiftDocOrg/swift-doc - path: swift-doc + - name: Install Homebrew + run: | + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -y - name: Install swift-doc run: | - cd swift-doc - make install + brew install swiftdocorg/formulae/swift-doc - name: Generate Documentation run: | swift doc generate ADPhotoKit/Classes --module-name ADPhotoKit --output Wiki From 0d7ec9e80fc8b962a2a2f6767218b4ad081564df Mon Sep 17 00:00:00 2001 From: ZeXu Du Date: Sat, 3 Aug 2024 17:48:56 +0800 Subject: [PATCH 4/5] Update Documentation.yml --- .github/workflows/Documentation.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index 41151ff..d2556e4 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -26,6 +26,8 @@ jobs: - 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 run: | brew install swiftdocorg/formulae/swift-doc From 024dae2029146bc0ec3450731553491985f5e387 Mon Sep 17 00:00:00 2001 From: ZeXu Du Date: Sat, 3 Aug 2024 17:52:02 +0800 Subject: [PATCH 5/5] Update Documentation.yml --- .github/workflows/Documentation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Documentation.yml b/.github/workflows/Documentation.yml index d2556e4..3f3c367 100644 --- a/.github/workflows/Documentation.yml +++ b/.github/workflows/Documentation.yml @@ -30,7 +30,7 @@ jobs: eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - name: Install swift-doc run: | - brew install swiftdocorg/formulae/swift-doc + /home/linuxbrew/.linuxbrew/bin/brew install swiftdocorg/formulae/swift-doc - name: Generate Documentation run: | swift doc generate ADPhotoKit/Classes --module-name ADPhotoKit --output Wiki