Update package.json #19
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: icon-automation | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
icon_automation: | |
name: figma icon automation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.x' | |
- name: Debug - Check Environment Variables | |
run: | | |
echo "FIGMA_FILE_URL is set: ${{ secrets.FIGMA_FILE_URL }}" | |
echo "FIGMA_TOKEN is set: ${{ secrets.FIGMA_TOKEN }}" | |
- name: Configure Yarn | |
run: yarn config set "strict-ssl" false | |
- name: Install dependencies | |
run: yarn install | |
- name: Figma Action | |
uses: primer/[email protected] | |
with: | |
args: "format=svg outputDir=./src/" | |
env: | |
FIGMA_FILE_URL: ${{ secrets.FIGMA_FILE_URL }} | |
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }} | |
- name: Generate files | |
run: yarn generate | |
- name: Build bundle | |
run: yarn build:bundle | |
- name: Setup NPM authentication | |
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc | |
- name: Publish to NPM | |
run: yarn publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
- name: Build project | |
run: yarn build | |
- name: Deploy to GitHub Pages | |
uses: crazy-max/ghaction-github-pages@v3 | |
with: | |
build_dir: docs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |