xmtp / xmtp-dot-org

xmtp.org, powered by Docusaurus
https://xmtp.org
MIT License
11 stars 25 forks source link

Create XIPs topic using remote content https://github.com/xmtp/XIPs/blob/main/XIPs/xip-0-purpose-process.md #45

Closed jhaaaa closed 2 years ago

jhaaaa commented 2 years ago

I believe that https://github.com/xmtp/XIPs/blob/main/XIPs/xip-0-purpose-process.md provides a fantastic way to learn about XIPs and how to participate.

I don't think there is a reason to reinvent the wheel on xmtp.org, so we should use the GitHub Action https://github.com/marketplace/actions/push-a-file-to-another-repository to push the content to appropriate locations on xmtp.org.

jhaaaa commented 2 years ago

HI there @vehidtr!

I took the GitHub Action yaml template you created <3 and updated it as follows:

​
on: push
​
jobs:
  copy-file:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2
​
    - name: Pushes file
      uses: dmnemec/copy_file_to_another_repo_action@main
      env:
        API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
      with:
        source_file: '/XIPs/xip-0-purpose-process.md'
        destination_repo: 'xmtp/xmtp-dot-org'
        destination_folder: 'what-is-xmtp'
        destination_branch: 'main'
        user_email: 'jha@xmtp.com'
        user_name: 'jhaaaa'
        commit_message: 'Single source XIP-0 MD to Dev Portal'

I'd like to see if we can pull https://github.com/xmtp/XIPs/blob/main/XIPs/xip-0-purpose-process.md into the what-is-xmtp folder structure in xmtp-dot-org. I'm not sure if my source_file path is correct. The repo is public as it turns out - so you should be able to see it!

One thing I'm curious about is how to add the page header "metadata" to the "pulled in" content. For example, I'd like to be able to set the sidebar_position value. Do you have ideas about how we might do that? =)

Also, how might we test this GitHub Action? =)

jhaaaa commented 2 years ago

Initially, I thought we'd single-source XIP info from https://github.com/xmtp/XIPs/blob/main/XIPs/xip-0-purpose-process.md. Subsequently, I realized that it is probably smarter to just introduce the topic on xmtp.org and link to https://github.com/xmtp/XIPs/blob/main/XIPs/xip-0-purpose-process.md for all of the details.

Introduction text comes verbatim from https://github.com/xmtp/XIPs/blob/main/XIPs/xip-0-purpose-process.md.

Fix delivered via https://github.com/xmtp/xmtp-dot-org/pull/139