Skip to content

fix: minor formatting and build process cleanup #316

fix: minor formatting and build process cleanup

fix: minor formatting and build process cleanup #316

Workflow file for this run

# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Docs
on: [push, pull_request]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: pnpm/action-setup@v3
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
cache: "pnpm"
- run: pnpm install
- run: pnpm build
- run: |
if [ -n "$(git status --porcelain README.md)" ]; then
echo "README.md is out of date. Please run 'pnpm build' and commit the changes."
exit 1
fi
# only main
- uses: s0/git-publish-subdir-action@61eb9e6420447e7cbf010f7cce37103665c46bfa
if: github.ref == 'refs/heads/main'
env:
REPO: self
BRANCH: gh-pages
FOLDER: storybook-static
GITHUB_TOKEN: ${{ secrets.GOOGLEWORKSPACE_BOT_TOKEN }}
CLEAR_GLOBS_FILE: .github/.clear_pages_glob
# only tags
- uses: s0/git-publish-subdir-action@61eb9e6420447e7cbf010f7cce37103665c46bfa
if: github.ref == 'refs/tags/*'
env:
REPO: self
BRANCH: gh-pages
FOLDER: storybook-static
GITHUB_TOKEN: ${{ secrets.GOOGLEWORKSPACE_BOT_TOKEN }}
TARGET: versions/tags/${{ github.ref_name }}
CLEAR_GLOBS_FILE: .github/.clear_pages_glob