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

Commit

Permalink
deploy docs only on tags (#242)
Browse files Browse the repository at this point in the history
* deploy docs only on tags

* change file name

* update release

* only release on publish
  • Loading branch information
cbaker6 authored Dec 17, 2020
1 parent 684e481 commit b84b43a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 14 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/swift.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
name: ci

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer'

jobs:

ios:
runs-on: macos-latest
steps:
Expand Down Expand Up @@ -116,9 +113,3 @@ jobs:
- name: Create Jazzy Docs
run: |
./jazzy.sh
- name: Deploy Jazzy Docs
if: github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
34 changes: 29 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: release

on:
push:
tags: '*'

release:
types: [published]
env:
CI_XCODE_VER: '/Applications/Xcode_11.7.app/Contents/Developer'

Expand All @@ -16,6 +14,32 @@ jobs:
- name: CocoaPods
run: set -o pipefail && env NSUnbufferedIO=YES pod lib lint --allow-warnings --verbose
- name: Deploy CocoaPods
run: set -o pipefail && env NSUnbufferedIO=YES pod trunk push CertificateSigningRequest.podspec --allow-warnings --verbose
run: set -o pipefail && env NSUnbufferedIO=YES pod trunk push ParseLiveQuery.podspec --allow-warnings --verbose
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}

docs:
needs: ios
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Cache Gems
id: cache-gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-
- name: Install Bundle
run: |
bundle config path vendor/bundle
bundle install
- name: Create Jazzy Docs
run: |
./jazzy.sh
- name: Deploy Jazzy Docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs

0 comments on commit b84b43a

Please sign in to comment.