fix(fe/asset/edit/sidebar): Removed styles that didn't use do anythin… #345
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: Storybook | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
- sandbox | |
paths: | |
- '.github/workflows/storybook.yml' | |
- 'frontend/ji_core/js/**' | |
- 'frontend/storybook/**' | |
- 'frontend/elements/**' | |
jobs: | |
prepare: | |
name: Prepare | |
runs-on: ubuntu-22.04 | |
outputs: | |
branch: "${{ steps.branch.outputs.value }}" | |
steps: | |
- name: Get branch from ref | |
id: branch | |
run: echo "value=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT | |
- name: Ensure valid branch | |
if: false == contains(fromJson('["master", "sandbox"]'), steps.branch.outputs.value) | |
run: | | |
echo "::error ${{ steps.branch.outputs.value }} cannot be deployed" | |
exit 1 | |
bundle: | |
needs: [prepare] | |
name: "[${{ needs.prepare.outputs.branch }}] Bundle" | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Set environment" | |
env: | |
BRANCH: ${{ needs.prepare.outputs.branch }} | |
run: | | |
if [[ ${BRANCH} == 'master' ]]; then | |
echo "ENVIRONMENT=release" >> $GITHUB_ENV | |
echo "PROJECT=ji-cloud" >> $GITHUB_ENV | |
echo "HOSTING=ji-cloud-storybook" >> $GITHUB_ENV | |
elif [[ ${BRANCH} == 'sandbox' ]]; then | |
echo "ENVIRONMENT=sandbox" >> $GITHUB_ENV | |
echo "PROJECT=ji-cloud-developer-sandbox" >> $GITHUB_ENV | |
echo "HOSTING=ji-cloud-sandbox-storybook" >> $GITHUB_ENV | |
fi | |
- uses: actions/checkout@v3 | |
- name: Extract label | |
shell: bash | |
run: echo "value=\"[${{needs.prepare.outputs.branch}} - storybook]\"" >> $GITHUB_OUTPUT | |
id: extract_label | |
- name: install node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: install build utils deps | |
run: npm install | |
working-directory: "./frontend/build-utils" | |
- name: install element deps | |
run: npm install | |
working-directory: "./frontend/elements" | |
env: | |
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }} | |
- name: test elements | |
run: npm run test | |
working-directory: "./frontend/elements" | |
env: | |
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }} | |
- name: install npm deps | |
run: npm install | |
working-directory: "./frontend/storybook" | |
env: | |
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }} | |
- name: build | |
run: npm run storybook:build:${{ env.ENVIRONMENT }} | |
working-directory: "./frontend/storybook" | |
env: | |
LOCAL_CDN_FRONTEND_DIR: ${{ github.workspace }}/frontend | |
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }} | |
- name: deploy to firebase | |
uses: w9jds/[email protected] | |
with: | |
args: deploy --project ${{ env.PROJECT }} --only hosting:${{ env.HOSTING }} | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} |