Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated Docs for "Readme rewrite with references to native SDKs and Klaviyo help center (#62) --------- Co-authored-by: Evan Masseau <> Co-authored-by: Kenny Tsui <[email protected]>" #85

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 3 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ jobs:

- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.2'
ruby-version: '2.6.10'

- name: Setup
uses: ./.github/actions/setup
Expand Down Expand Up @@ -158,54 +158,11 @@ jobs:
- name: Install cocoapods
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
run: |
yarn pod-install example/ios
brew install watchman
cd example/ios
pod install
env:
NO_FLIPPER: 1

- name: Build example for iOS
run: |
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"


generate-documentation:
# Only run on master branch push (e.g. after pull request merge).
if: github.event_name == 'push'
runs-on: ubuntu-22.04
env:
CI_COMMIT_MESSAGE: Generated docs for ${{ github.sha }}
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: documentation
fetch-depth: 0

- name: Setup
uses: ./.github/actions/setup

- name: Git config
run: |
git config user.name github-actions
git config user.email [email protected]
git fetch origin

- name: Create branch for docs PR
run: |
git checkout -b "documentation-${{ github.sha }}"
git merge origin/master --no-edit --strategy-option theirs

- name: Generate docs
run: |
yarn generate-docs

- name: Commit and push docs
run: |
git add docs
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push -u origin "documentation-${{ github.sha }}"

- name: Create PR for doc updates
run: |
gh pr create --draft --title "Generated Docs for \"$(git show -s --format=%B ${{ github.sha }})\"" --body "This PR was automatically generated by a GitHub Action for ${{ github.sha }}." -B "documentation" -H "documentation-${{ github.sha }}"
57 changes: 57 additions & 0 deletions .github/workflows/doc-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: CI

on:
push:
branches:
- master

permissions:
contents: write
pull-requests: write

jobs:

generate-documentation:
runs-on: ubuntu-22.04
env:
CI_COMMIT_MESSAGE: Generated docs for ${{ github.sha }}
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: documentation
fetch-depth: 0

- name: Setup
uses: ./.github/actions/setup

- name: Git config
run: |
git config user.name github-actions
git config user.email [email protected]
git fetch origin

- name: Create branch for docs PR
run: |
git checkout -b "documentation-${{ github.sha }}"
git merge origin/master --no-edit --strategy-option theirs

- name: Generate docs
run: |
yarn generate-docs

- name: Commit and push docs
run: |
if [ $(git status -s -uno | wc -l) -eq 0 ]; then
echo "No documentation to change"
exit 0
fi

git add docs
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
git push -u origin "documentation-${{ github.sha }}"

- name: Create PR for doc updates
run: |
gh pr create --title "Generated Docs for \"$(git show -s --format=%B ${{ github.sha }})\"" --body "This PR was automatically generated by a GitHub Action for ${{ github.sha }}." -B "documentation" -H "documentation-${{ github.sha }}"
Loading