Solutions

Resources

Solutions

Resources

Solutions

Resources

Getting Started

·

8 min

read

How to pull design tokens from several Specify repositories in GitHub

Learn how to sync your design tokens from several Specify repositories to GitHub.

Written by

Published On

Nov 30, 2022

Written by

Published On

Nov 30, 2022

Written by

Published On

Nov 30, 2022

This article will help you pull design tokens from several Specify repositories to your GitHub repository.

You could benefit from this if your need to implement Specify in your monorepo or if you want to pull design tokens from several repositories like a "Light Theme" or a "Dark Theme" one.

By default, The Specify GitHub App only works with a single .specifyrc.json at the root of your GitHub repository. A Specify configuration file can only pull design data from a single Specify repository.

The Specify CLI is more flexible and helps you use several Specify configuration files.


Prerequisites

Please make sure you have:

  • Several source Specify repositories containing your design tokens

  • A Specify Personal Access Token


The workflow

Our workflow is based on a GitHub Action that automatically pulls design tokens from Specify. If your Specify and your GitHub repository differ, a new PR will be opened containing your updated design tokens.

Design tokens from 3 Specify repositories generated by the Specify CLI inside a GitHub repository.


This workflow consists in 3 steps:

  1. Its installs the Specify CLI

  2. It pulls design tokens from several Specify repositories from the same example organization @acme-inc: General, Light-Theme and Dark-Theme

  3. It creates a Pull Request on a new branch called specify


How to use this workflow in GitHub

First, fork this GitHub repository that contains everything to help you get started.

Secondly, enable GitHub workflows in your GitHub repository.


Then, set a new repository secret called SPECIFY_TOKEN containing your Specify Personal Access Token in your GitHub repository: Settings > Secrets > Actions.


Finally, update the GitHub Action to set your own Specify repositories and Specify config files.

Now, test your workflow by executing it manually:


You should now see a new Pull Request created like so:


Going further

This article focuses on how to automatically pull design data from several Specify repositories in GitHub. The Specify configurations we used may not generate what you're looking for.

Here are useful resources that will help you transform your design data:

Start automating
your design system today

Start automating
your design system today

Start automating
your design system today