Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.

Commit b84b43a

Browse files
authored
deploy docs only on tags (#242)
* deploy docs only on tags * change file name * update release * only release on publish
1 parent 684e481 commit b84b43a

File tree

2 files changed

+29
-14
lines changed

2 files changed

+29
-14
lines changed

.github/workflows/swift.yml renamed to .github/workflows/ci.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
name: ci
2-
32
on:
43
push:
54
branches: [ main ]
65
pull_request:
76
branches: [ main ]
8-
97
env:
108
CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer'
119

1210
jobs:
13-
1411
ios:
1512
runs-on: macos-latest
1613
steps:
@@ -116,9 +113,3 @@ jobs:
116113
- name: Create Jazzy Docs
117114
run: |
118115
./jazzy.sh
119-
- name: Deploy Jazzy Docs
120-
if: github.ref == 'refs/heads/main'
121-
uses: peaceiris/actions-gh-pages@v3
122-
with:
123-
github_token: ${{ secrets.GITHUB_TOKEN }}
124-
publish_dir: ./docs

.github/workflows/release.yml

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
name: release
2-
32
on:
4-
push:
5-
tags: '*'
6-
3+
release:
4+
types: [published]
75
env:
86
CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer'
97

@@ -16,6 +14,32 @@ jobs:
1614
- name: CocoaPods
1715
run: set -o pipefail && env NSUnbufferedIO=YES pod lib lint --allow-warnings --verbose
1816
- name: Deploy CocoaPods
19-
run: set -o pipefail && env NSUnbufferedIO=YES pod trunk push CertificateSigningRequest.podspec --allow-warnings --verbose
17+
run: set -o pipefail && env NSUnbufferedIO=YES pod trunk push ParseLiveQuery.podspec --allow-warnings --verbose
2018
env:
2119
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
20+
21+
docs:
22+
needs: ios
23+
runs-on: macos-latest
24+
steps:
25+
- uses: actions/checkout@v2
26+
- name: Cache Gems
27+
id: cache-gems
28+
uses: actions/cache@v2
29+
with:
30+
path: vendor/bundle
31+
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
32+
restore-keys: |
33+
${{ runner.os }}-gem-
34+
- name: Install Bundle
35+
run: |
36+
bundle config path vendor/bundle
37+
bundle install
38+
- name: Create Jazzy Docs
39+
run: |
40+
./jazzy.sh
41+
- name: Deploy Jazzy Docs
42+
uses: peaceiris/actions-gh-pages@v3
43+
with:
44+
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
publish_dir: ./docs

0 commit comments

Comments
 (0)