-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
79 lines (70 loc) · 2.21 KB
/
cd.yml
File metadata and controls
79 lines (70 loc) · 2.21 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CD
on:
workflow_dispatch:
inputs:
version:
required: true
pods:
required: false
jobs:
pods:
if: ${{ github.event.inputs.pods != 'false' }}
runs-on: macos-latest
steps:
- name: Start Deployment
uses: bobheadxi/deployments@v0.5.2
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: pods
- uses: actions/checkout@v2
- run: pod trunk push --allow-warnings --skip-tests --skip-import-validation
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
PMKVersion: ${{ github.event.inputs.version }}
- name: Seal Deployment
uses: bobheadxi/deployments@v0.5.2
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}
docs:
runs-on: macos-latest
steps:
- name: Start Deployment
uses: bobheadxi/deployments@v0.5.2
id: deployment
with:
step: start
token: ${{ secrets.GITHUB_TOKEN }}
env: docs
- run: echo "v=${v:0:1}" >> $GITHUB_ENV
env:
v: ${{ github.event.inputs.version }}
- uses: actions/checkout@v2
- run: gem install jazzy
- run: |
jazzy --config .github/jazzy.yml \
--github_url 'https://github.com/mxcl/PromiseKit' \
--module-version ${{ github.event.inputs.version }}
- run: git remote update
- run: git checkout gh-pages
- run: rm -rf reference/v$v
- run: mv output reference/v$v
- run: git add reference/v$v
- run: git config user.name github-actions
- run: git config user.email github-actions@github.com
- run: git commit -m 'Updated docs for v${{ github.event.inputs.version }}'
- run: git remote add secure-origin https://${{ secrets.JAZZY_PAT }}@github.com/mxcl/PromiseKit.git
- run: git push secure-origin gh-pages
- name: Seal Deployment
uses: bobheadxi/deployments@v0.5.2
if: always()
with:
step: finish
token: ${{ secrets.GITHUB_TOKEN }}
status: ${{ job.status }}
deployment_id: ${{ steps.deployment.outputs.deployment_id }}