File tree 1 file changed +58
-0
lines changed
1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy Docs
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ permissions :
9
+ contents : read
10
+ pages : write
11
+ id-token : write
12
+
13
+ jobs :
14
+ build :
15
+ name : Build
16
+ runs-on : macos-latest
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+ - name : Build Docs
20
+ run : |
21
+ xcodebuild docbuild \
22
+ -scheme PowerSync \
23
+ -destination 'platform=macOS' \
24
+ -derivedDataPath ./DerivedData \
25
+ -configuration Release
26
+
27
+ - name : Process Docs
28
+ run : |
29
+ xcrun docc process-archive \
30
+ transform-for-static-hosting \
31
+ ./DerivedData/Build/Products/Release/PowerSync.doccarchive/ \
32
+ --output-path ./docs-site \
33
+ --hosting-base-path /powersync-swift
34
+
35
+ # The Docs are available at the path mentioned below. We can override the index.html to automatically redirect to the documentation page.
36
+ - name : Prepare static files
37
+ run : |
38
+ echo '<script>window.location.href += "/documentation/powersync"</script>' > ./docs-site/index.html
39
+
40
+ - name : Upload static files as artifact
41
+ id : deployment
42
+ uses : actions/upload-pages-artifact@v3
43
+ with :
44
+ path : docs-site
45
+ outputs :
46
+ page_url : ${{ steps.deployment.outputs.page_url }}
47
+
48
+ # Deployment job
49
+ deploy :
50
+ environment :
51
+ name : github-pages
52
+ url : ${{ needs.build.outputs.page_url }}
53
+ runs-on : ubuntu-latest
54
+ needs : build
55
+ steps :
56
+ - name : Deploy to GitHub Pages
57
+ id : deployment
58
+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments