feat(icons): add new custom and mdi icons (#489) #23
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: Icons CDN Deploy | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'packages/icons/svg/**' | |
jobs: | |
icons-deploy: | |
name: Icons CDN Deploy | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
packages: read | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: 'https://npm.pkg.github.com' | |
token: ${{ secrets.GH_ACTIONS }} | |
- name: Create .npmrc | |
run: | | |
echo "@juntossomosmais:registry=https://npm.pkg.github.com" >> .npmrc | |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GH_ACTIONS }}" >> .npmrc | |
- name: Cache node modules | |
id: cache-npm | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: List the state of node modules | |
if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
continue-on-error: true | |
run: npm list | |
- name: Install dependencies | |
run: npm ci --legacy-peer-deps | |
continue-on-error: false | |
- name: Build icons | |
run: npm run icons:build | |
continue-on-error: false | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
aws-region: us-east-1 | |
- name: Sync AWS S3 bucket | |
run: | | |
aws s3 sync packages/icons/dist/svg ${{ secrets.AWS_S3_BUCKET }} |