-
Notifications
You must be signed in to change notification settings - Fork 5.1k
43 lines (43 loc) · 1.26 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
on:
push:
branches:
- main
- try-pages
jobs:
deploy:
runs-on: "macos-15"
permissions:
contents: read
deployments: write
name: Deploy to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install npm packages
run: npm install
- name: Setup Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "16.0"
- name: Get swift version
run: swift --version
- name: Build
run: xcrun docc convert swift-6-beta.docc \
--output-path ./docs \
--hosting-base-path swift-6-beta \
--fallback-display-name "Swift 6 Beta" \
--fallback-bundle-identifier com.example.swift6beta \
--fallback-bundle-version 1.0.0 \
--transform-for-static-hosting
- name: Publish
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: the-swift-programming-language-in-chinese
directory: docs
gitHubToken: ${{ secrets.GITHUB_TOKEN }}