📚 Bump the dependencies group across 1 directory with 5 updates #307
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: "Build and Preview" | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
- closed | |
permissions: write-all | |
concurrency: preview-${{ github.ref }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Make sure it builds. Then show a preview. | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '21' | |
cache: 'npm' | |
- name: Cache dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: npm-${{ hashFiles('package-lock.json') }} | |
restore-keys: npm- | |
- name: Install dependencies | |
run: npm ci | |
- name: Set env | |
run: echo "CESIUM_BASE_URL="pr-preview/pr-$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')/"" >> $GITHUB_ENV | |
- name: Run build with Base | |
run: npx vite build --base=${{ env.CESIUM_BASE_URL }} | |
env: | |
VITE_CESIUM_TOKEN: ${{ secrets.VITE_CESIUM_TOKEN }} | |
- name: Deploy preview | |
uses: rossjrw/pr-preview-action@v1 | |
with: | |
source-dir: ./build/ |