@@ -23,60 +23,63 @@ jobs:
23
23
needs : build-jekyll
24
24
runs-on : macos-13
25
25
timeout-minutes : 10
26
+ permissions : read-all
26
27
steps :
27
- - uses : actions/checkout@v4
28
- with :
29
- lfs : ' true'
30
- - name : Download Jekyll Artifact
31
- uses : actions/download-artifact@v3
32
- with :
33
- name : jekyll-site
34
- path : _site
28
+ - uses : actions/checkout@v4
29
+ with :
30
+ lfs : ' true'
31
+ - name : Download Jekyll Artifact
32
+ uses : actions/download-artifact@v3
33
+ with :
34
+ name : jekyll-site
35
+ path : _site
35
36
36
- - name : Select Xcode
37
- run : sudo xcode-select -s /Applications/Xcode_15.0.1.app
37
+ - name : Select Xcode
38
+ run : sudo xcode-select -s /Applications/Xcode_15.0.1.app
38
39
39
- - name : Generate DocC docs
40
- run : |
41
- SCHEME="HVCaptureSDK"
40
+ - name : Generate DocC docs
41
+ run : |
42
+ SCHEME="HVCaptureSDK"
42
43
43
- # have derivedData outside of project dir to avoid SPM cache issue? https://forums.swift.org/t/xcode-and-swift-package-manager/44704/5
44
- TMP_BUILDIR="$HOME/doc-build"
45
- mkdir -p ${TMP_BUILDIR}
46
- DOCARCHIVE_DIR="tmp/docs"
47
- mkdir -p ${DOCARCHIVE_DIR}
48
- PAGE_DIR="tmp/site"
49
- mkdir -p ${PAGE_DIR}
44
+ # have derivedData outside of project dir to avoid SPM cache issue? https://forums.swift.org/t/xcode-and-swift-package-manager/44704/5
45
+ TMP_BUILDIR="$HOME/doc-build"
46
+ mkdir -p ${TMP_BUILDIR}
47
+ DOCARCHIVE_DIR="tmp/docs"
48
+ mkdir -p ${DOCARCHIVE_DIR}
49
+ PAGE_DIR="tmp/site"
50
+ mkdir -p ${PAGE_DIR}
50
51
51
- touch $HOME/.netrc
52
- echo "machine api.github.com login hover-devops password ${{ secrets.DEVOPS_PAT }}" > $HOME/.netrc
52
+ touch $HOME/.netrc
53
+ echo "machine api.github.com" > $HOME/.netrc
54
+ echo "login ${{ secrets.GITHUB_TOKEN }}" >> $HOME/.netrc
55
+ echo "password ${{ secrets.GITHUB_TOKEN }}" >> $HOME/.netrc
53
56
54
- # compile the DocC archive(s)
55
- xcodebuild docbuild \
56
- -scheme "${SCHEME}" \
57
- -destination generic/platform=iOS \
58
- -derivedDataPath "${TMP_BUILDIR}"
59
- # collect the generated docarchive(s)
60
- cp -R $(find ${TMP_BUILDIR} -type d -name "*.doccarchive") "${DOCARCHIVE_DIR}/."
61
- # NOTE: this command seems to wipe out the path specified by --output-path, so use a tmp dir that you don't mind getting deleted (i.e. don't use _site as the output directory directly)
62
- $(xcrun --find docc) process-archive transform-for-static-hosting "${DOCARCHIVE_DIR}/${SCHEME}.doccarchive" --hosting-base-path "hover-capture-ios" --output-path "${PAGE_DIR}"
57
+ # compile the DocC archive(s)
58
+ xcodebuild docbuild \
59
+ -scheme "${SCHEME}" \
60
+ -destination generic/platform=iOS \
61
+ -derivedDataPath "${TMP_BUILDIR}"
62
+ # collect the generated docarchive(s)
63
+ cp -R $(find ${TMP_BUILDIR} -type d -name "*.doccarchive") "${DOCARCHIVE_DIR}/."
64
+ # NOTE: this command seems to wipe out the path specified by --output-path, so use a tmp dir that you don't mind getting deleted (i.e. don't use _site as the output directory directly)
65
+ $(xcrun --find docc) process-archive transform-for-static-hosting "${DOCARCHIVE_DIR}/${SCHEME}.doccarchive" --hosting-base-path "hover-capture-ios" --output-path "${PAGE_DIR}"
63
66
64
- # Copy DocC Output to Jekyll Site
65
- mkdir -p _site/
66
- # get rid of the DocC index.html, since it's an empty page anyways and we don't want to overwrite the Jekyll one
67
- rm "${PAGE_DIR}"/index.html
68
- cp -R "${PAGE_DIR}"/* _site/.
69
- rm -rf "${TMP_BUILDIR}"
67
+ # Copy DocC Output to Jekyll Site
68
+ mkdir -p _site/
69
+ # get rid of the DocC index.html, since it's an empty page anyways and we don't want to overwrite the Jekyll one
70
+ rm "${PAGE_DIR}"/index.html
71
+ cp -R "${PAGE_DIR}"/* _site/.
72
+ rm -rf "${TMP_BUILDIR}"
70
73
71
- - name : Fix GH-pages permissions
72
- run : |
73
- # from https://github.com/actions/upload-pages-artifact
74
- chmod -v -R +rX "_site/" | while read line; do
75
- echo "::warning title=Invalid file permissions automatically fixed::$line"
76
- done
74
+ - name : Fix GH-pages permissions
75
+ run : |
76
+ # from https://github.com/actions/upload-pages-artifact
77
+ chmod -v -R +rX "_site/" | while read line; do
78
+ echo "::warning title=Invalid file permissions automatically fixed::$line"
79
+ done
77
80
78
- - name : Upload Pages artifact
79
- uses : actions/upload-pages-artifact@v2
81
+ - name : Upload Pages artifact
82
+ uses : actions/upload-pages-artifact@v2
80
83
81
84
# Deploy github pages job
82
85
deploy :
0 commit comments