Add generate-jazzy-docs.yml #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Jazzy Docs | |
#workflow_dispatch | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- 'main' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
generate-jazzy-docs: | |
name: Generate Docs | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@5311f05890856149502132d25c4a24985a00d426 | |
with: | |
ruby-version: 3.2.2 | |
- name: Install SourceKitten | |
run: | | |
brew install sourcekitten | |
- name: Install Jazzy | |
run: | | |
gem install jazzy | |
- name: Pod Install Frames | |
run: | | |
cd "iOS Example Frame" | |
pod install | |
- name: Pod Install Checkout | |
run: | | |
cd "Checkout/Samples/CocoapodsSample" | |
pod install | |
- name: Generate Docs | |
run: sh .github/scripts/buildDocs.sh | |
- name: Create Pull Request | |
env: | |
BRANCH_NAME: "update/jazzy-docs" | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git branch $BRANCH_NAME | |
git checkout $BRANCH_NAME | |
git add . | |
git commit -m "Update jazzy docs" | |
git push -u origin $BRANCH_NAME | |
gh pr create -t "Update Jazzy Docs" -b "Automated Update for Jazzy Docs" |