Update packages for Tooltip
component
#41
Workflow file for this run
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: cloudflare-pages | |
on: | |
workflow_call: | |
secrets: | |
CLOUDFLARE_API_TOKEN: | |
description: "Token for publishing to Cloudflare Pages" | |
required: true | |
CLOUDFLARE_ACCOUNT_ID: | |
description: "Account ID for publishing to Cloudflare Pages" | |
required: true | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
types: | |
- opened | |
- synchronize | |
paths: | |
- "website/**" | |
- "packages/kubrick/package.json" | |
- ".github/workflows/cloudflare-pages.yml" | |
env: | |
NODE_VERSION: 20 | |
STORYBOOK_BASE_URL: https://66e68bc88881b2397d6befdb-zlgmfvcbsp.chromatic.com | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
deployments: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: "npm" | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "7.4" | |
- name: Get Composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache Composer dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer | |
- name: Install dependencies | |
run: | | |
npm ci --workspaces --no-audit --ignore-scripts | |
composer install --prefer-dist | |
- name: Run build | |
env: | |
NODE_ENV: production | |
run: | | |
npm run build | |
npm run website:build | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/wrangler-action@v3 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
command: pages deploy website/dist --project-name=kubrick | |
wranglerVersion: "3" |