Skip to content
refresh-cw

GitHub Action

Publish Blogs

v1.0.0 Latest version

Publish Blogs

refresh-cw

Publish Blogs

When pushing Zenn articles to GitHub, convert them to Qiita format and publish them

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Publish Blogs

uses: C-Naoki/zenn-qiita-sync@v1.0.0

Learn more about this action in C-Naoki/zenn-qiita-sync

Choose a version

zenn-qiita-sync

Star Badge

This tool automatically publishes articles to qiita when you push zenn format articles to GitHub. Publishing your articles to multiple platforms can share your knowledge with more people.

  Table of Contents (Click to open)

🚀 Getting Started

You can use this tool by following the steps below. Refer my repo using this tool for practical example.

  1. Build directory structure as follows

    .
    ├── .github
    │   └── workflows
    │       └── publish.yml
    ├── articles
    │   └── <Zenn format articles>
    ├── books
    │   └── <Zenn books (optional)>
    ├── images
    │   └── <Image files used in articles>
    └── qiita
        └── public
            └── <Qiita format articles>
    
  2. Issue the Qiita access token using qiita-cli.

  3. Set the issued token as a secret variable.

    • Go to https://github.com/<USERNAME>/<REPO>/settings/secrets/actions/new (by replacing <USERNAME> and <REPO> with your information).

    • Set the value as QIITA_TOKEN = <Your Qiita Access Token>.

  4. Create a new workflow (e.g., publish.yml) within .github/workflows in your own repository.

    Example (Feel free to copy and paste the following)

    name: Publish articles
    
    on:
      push:
        branches:
          - main
          - master
        workflow_dispatch:
    
    permissions:
      contents: write
    
    concurrency:
      group: ${{ github.workflow }}-${{ github.ref }}
      cancel-in-progress: false
    
    jobs:
      publish_articles:
        runs-on: ubuntu-latest
        timeout-minutes: 5
        steps:
          - name: Checkout
            uses: actions/checkout@v4
            with:
              fetch-depth: 0
    
          - name: Run
            uses: C-Naoki/zenn-qiita-sync@main
            with:
              qiita-token: ${{ secrets.QIITA_TOKEN }}

🙋‍♂️ Support

💙 If you like this app, give it a ⭐ and share it with friends!

✉️ Contact

💥 For questions or issues, feel free to open an issue. I appreciate your feedback and look forward to hearing from you!

🙏 Acknowledgement

I appreciate the following articles and open sources for providing useful information and valuable codes: