fix: fix tree parent padding #64
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: Deploy Main Branch | |
on: | |
push: | |
branches: | |
- main | |
# https://github.com/orgs/community/discussions/26681 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
contents: read | |
jobs: | |
deploy: | |
if: github.repository_owner == 'inventage' && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1 | |
with: | |
node-version: '18' | |
# @see https://www.voorhoede.nl/en/blog/super-fast-npm-install-on-github-actions/ | |
- uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 # v4.0.1 | |
id: cache | |
with: | |
path: ./node_modules | |
key: ${{ runner.os }}-modules-${{ hashFiles('package-lock.json') }} | |
- name: Install packages | |
if: steps.cache.outputs.cache-hit != 'true' | |
env: | |
HUSKY_SKIP_HOOKS: 1 | |
run: npm ci | |
- name: Run postinstall | |
if: steps.cache.outputs.cache-hit == 'true' | |
run: npm run --if-present postinstall && npm rebuild && npm run prepare --if-present | |
- name: Storybook Build | |
run: npm run storybook:build | |
- run: | | |
echo "GITHUB_SHA_SHORT=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV | |
# Use netlify-cli directly, since it is installed in the latest ubuntu runner | |
# @see https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#cli-tools | |
# @see https://cli.netlify.com/commands/deploy/ | |
- name: Deploy | |
id: deploy | |
run: | | |
mv package.json _package.json && \ | |
netlify deploy \ | |
--build false \ | |
--dir storybook-static \ | |
--message 'Production deployment (${{ env.GITHUB_SHA_SHORT }})' \ | |
--prod true \ | |
--json true | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |