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

Generate docs content to Pages #207

Merged
merged 24 commits into from
Dec 20, 2023
Merged

Generate docs content to Pages #207

merged 24 commits into from
Dec 20, 2023

Conversation

humanagent
Copy link
Contributor

@humanagent humanagent commented Dec 7, 2023

Fixed SDK docs issues while doing docs deployment

name: Deploy docs content to GitHub Pages

on:
  push:
    branches: ["main", "docs", "docs_build_v1"]
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: "pages"
  cancel-in-progress: false

jobs:
  deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: macos-12
    steps:
      - uses: actions/checkout@v3

      - name: Set up Ruby
        uses: ruby/setup-ruby@v1
        with:
          ruby-version: 3.0

      - name: Cache Ruby gems
        uses: actions/cache@v2
        with:
          path: vendor/bundle
          key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
          restore-keys: |
            ${{ runner.os }}-gems-

      - name: Install Jazzy
        run: |
          bundle config path vendor/bundle
          bundle add jazzy

      - name: Generate documentation
        run: bundle exec jazzy --output ./docs --theme=fullwidth

      - name: Setup Pages
        uses: actions/configure-pages@v3

      - name: Upload artifact
        uses: actions/upload-pages-artifact@v1
        with:
          path: "./docs"

      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v2

To run this locally:

gem install jazzy
jazzy --output ./docs --theme=fullwidth

Add branch to build docs
@humanagent humanagent marked this pull request as ready for review December 7, 2023 20:15
@humanagent humanagent requested a review from a team as a code owner December 7, 2023 20:15
@humanagent humanagent changed the title Doc build Generate docs content to Pages Dec 7, 2023
@humanagent humanagent requested a review from nplasterer December 7, 2023 20:22
Copy link
Contributor

@nplasterer nplasterer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Seems to be working. I'd suggest deleting the old docs deployment action so we don't have two running https://github.com/xmtp/xmtp-ios/blob/main/.github/workflows/build-docs.yml

.github/workflows/docs.yml Outdated Show resolved Hide resolved
.github/workflows/docs.yml Outdated Show resolved Hide resolved
Sources/XMTP/Client.swift Outdated Show resolved Hide resolved
Comment on lines +1 to +2
source 'https://rubygems.org'
gem 'jazzy'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know enough about iOS development to know if this would be an issue cc @nakajima

Copy link
Contributor Author

@humanagent humanagent Dec 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm trying to speed it up a bit. This file is caching jazzy and saving almost 1.5min. Doesn't have that much of an impact so i can delete it if can cause potential conflicts.

CleanShot 2023-12-08 at 09 17 08@2x

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me.

Comment on lines +1 to +2
source 'https://rubygems.org'
gem 'jazzy'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me.

@humanagent humanagent merged commit 6f4a930 into main Dec 20, 2023
2 checks passed
@humanagent humanagent deleted the docs_build_v1 branch December 20, 2023 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants