Skip to content

fix: doc site import #969

fix: doc site import

fix: doc site import #969

Workflow file for this run

name: NPM Publish
on:
push:
branches:
- main
paths:
- 'packages/**'
- '.github/workflows/npm-publish.yml'
jobs:
publish-to-npm:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: 'true'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: Install and Build
run: |
npm run publish-packages
- name: Publish @iot-app-kit/core
uses: JS-DevTools/npm-publish@v3
with:
package: './packages/core/package.json'
token: ${{ secrets.NPM_TOKEN }}
- name: Publish @iot-app-kit/source-iotsitewise
uses: JS-DevTools/npm-publish@v3
with:
package: './packages/source-iotsitewise/package.json'
token: ${{ secrets.NPM_TOKEN }}
- name: Publish @iot-app-kit/react-components
uses: JS-DevTools/npm-publish@v3
with:
package: './packages/react-components/package.json'
token: ${{ secrets.NPM_TOKEN }}
- name: Publish @iot-app-kit/source-iottwinmaker
uses: JS-DevTools/npm-publish@v3
with:
package: './packages/source-iottwinmaker/package.json'
token: ${{ secrets.NPM_TOKEN }}
- name: Publish @iot-app-kit/dashboard
uses: JS-DevTools/npm-publish@v3
with:
package: './packages/dashboard/package.json'
token: ${{ secrets.NPM_TOKEN }}
- name: Publish @iot-app-kit/core-util
uses: JS-DevTools/npm-publish@v3
with:
package: './packages/core-util/package.json'
token: ${{ secrets.NPM_TOKEN }}
- name: Publish @iot-app-kit/scene-composer
uses: JS-DevTools/npm-publish@v3
with:
package: './packages/scene-composer/package.json'
token: ${{ secrets.NPM_TOKEN }}
- name: Publish @iot-app-kit/tools-iottwinmaker
uses: JS-DevTools/npm-publish@v3
with:
package: './packages/tools-iottwinmaker/package.json'
token: ${{ secrets.NPM_TOKEN }}
sync-npm-to-brazil:
needs: publish-to-npm
runs-on: ubuntu-latest
permissions:
id-token: write # needed to interact with GitHub's OIDC Token endpoint
steps:
- name: Configure AWS credentials 🔑
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.BRAZIL_NPM_SYNC_ROLE }}
aws-region: us-west-2
- name: Invoke Sync Lambda 🔄
uses: gagoar/invoke-aws-lambda@master
with:
AWS_ACCESS_KEY_ID: ${{env.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{env.AWS_SECRET_ACCESS_KEY}}
AWS_SESSION_TOKEN: ${{env.AWS_SESSION_TOKEN}}
REGION: us-west-2
FunctionName: ${{ secrets.BRAZIL_NPM_SYNC_LAMBDA_NAME }}