Skip to content

Commit

Permalink
Deploy to Figma REST API from Design Tokens Repo (#136)
Browse files Browse the repository at this point in the history
* feat(figma): adding workflow scripts, node scripts

* fix: passing in tokens through github

* fix: changing script to workflow dispatch

* style: improving script readability

* Updating the figma script to include the sub-collections

* Cleaning up figma.cjs script, adding outline text.md file for the script

* feat: Updating github actions to use custom action

* chore: removing figma.cjs file, now in github action

* chore: reverting changes to package-lock.json, removing text.md

---------

Co-authored-by: Marionne Patel <[email protected]>
  • Loading branch information
brianferry and marionnegp authored Nov 14, 2024
1 parent aea6a9f commit 6cdfbc8
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/figma.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Figma

on:
workflow_dispatch:
inputs:
file_id:
description: 'Figma file ID'
required: true
figma_token:
description: 'Figma API token'
required: true
style_dictionary_url:
description: 'Style Dictionary URL'
required: true

jobs:
add-collection-to-figma:
# Prevents changesets action from creating a PR on forks
if: github.repository == 'RedHat-UX/red-hat-design-tokens'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: brianferry/[email protected]
with:
api_token: ${{ github.event.inputs.figma_token }}
file_id: ${{ github.event.inputs.file_id }}
style_dictionary_url: ${{ github.event.inputs.style_dictionary_url }}
- name: Archive Figma Tokens Payload
uses: actions/upload-artifact@v2
with:
name: figma-tokens
path: build/

0 comments on commit 6cdfbc8

Please sign in to comment.