@@ -49,16 +49,29 @@ jobs:
49
49
fileName : swift-doc.exe
50
50
out-file-path : C:\Library\Developer\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin\
51
51
52
+ - name : Prepare
53
+ run : |
54
+ git config user.email "${{ github.actor }}@users.noreply.github.com"
55
+ git config user.name "Swift/Win32"
56
+ git worktree add --no-checkout --detach site
57
+ git -C site remote rm origin
58
+ git -C site remote add origin "https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }}"
59
+ git -C site checkout --orphan gh-pages
60
+ git -C site reset --hard
61
+
52
62
- name : Generate Documentation
53
63
run : |
54
- New-Item -Path . -Name root -ItemType Directory
55
- git -C root init
56
- git -C root config --local user.email "${{ github.actor }}@users.noreply.github.com"
57
- git -C root config --local user.name "Swift/Win32"
58
- git -C root remote add origin origin "https://x-access-token:${{ secrets.PAT }}@github.com/${{ github.repository }}"
59
- swift doc generate Sources\SwiftWin32\CG --module-name CoreGraphics --output root\CoreGraphics --format html --base-url https://compnerd.github.io/swift-win32/CoreGraphics
60
- swift doc generate Sources\SwiftWin32 --module-name SwiftWin32 --output root\SwiftWin32 --format html --base-url https://compnerd.github.io/swift-win32/SwiftWin32
61
- swift doc generate Sources\SwiftWin32UI --module-name SwiftWin32UI --output root\SwiftWin32UI --format html --base-url https://compnerd.github.io/swift-win32/SwiftWin32UI
62
- git -C root add --all
63
- git -C root commit -m "refresh content"
64
- git -C root push origin "+HEAD:refs/heads/gh-pages"
64
+ New-Item -Path . -Name site -ItemType Directory
65
+ swift doc generate Sources\SwiftWin32\CG --module-name CoreGraphics --output site\CoreGraphics --format html --base-url https://compnerd.github.io/swift-win32/CoreGraphics
66
+ swift doc generate Sources\SwiftWin32 --module-name SwiftWin32 --output site\SwiftWin32 --format html --base-url https://compnerd.github.io/swift-win32/SwiftWin32
67
+ swift doc generate Sources\SwiftWin32UI --module-name SwiftWin32UI --output site\SwiftWin32UI --format html --base-url https://compnerd.github.io/swift-win32/SwiftWin32UI
68
+
69
+ - name : Deploy
70
+ run : |
71
+ git -C site add --all
72
+ git -C site commit --quiet --no-verify -m "${{ github.repository }}@${{ github.sha }}"
73
+ git -C site push origin --force-with-lease HEAD:refs/heads/gh-pages
74
+
75
+ - name : Cleanup
76
+ run : |
77
+ git worktree remove --force site
0 commit comments