Skip to content

Add documentation upload step to CI #13

Add documentation upload step to CI

Add documentation upload step to CI #13

Workflow file for this run

name: CI
on: [push]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: pnpm/action-setup@v4
with:
version: 8
- uses: actions/checkout@v4
with:
fetch-depth: 2
- run: pnpm install
- run: pnpm test
- run: pnpm lint
- run: pnpm format:check
- run: pnpm build
- name: Publish package
run: |
if [ $GITHUB_REF != "refs/heads/main" ]; then
echo "Branch is not main, skipping publish step"
exit 0
fi
echo "Branch is main, proceeding..."
prev_version=$(git show HEAD~1:package.json | jq -r '.version')
new_version=$(cat package.json | jq -r '.version')
if [ $prev_version = $new_version ]; then
echo "Version has not changed, skipping publish step"
exit 0
fi
echo "Version was changed from ${prev_version} to ${new_version}, proceeding with publish step..."
echo "Setting auth token..."
pnpm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
echo "Set auth token"
echo "Publishing package..."
pnpm publish
- name: Build documentation:

Check failure on line 43 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yaml

Invalid workflow file

You have an error in your yaml syntax on line 43
run: pnpm build-storybook
- name: Upload documentation artifact
uses: actions/upload-pages-artifact@v3
with:
path: storybook-static
- name: Publish documentation
uses: actions/deploy-pages@v4