Skip to content

Bump vite from 6.1.0 to 6.1.1 #406

Bump vite from 6.1.0 to 6.1.1

Bump vite from 6.1.0 to 6.1.1 #406

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request_target:
branches: ["main"]
workflow_dispatch:
jobs:
ci:
runs-on: macos-latest # pagefind not working on x64 architecture
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: Create LFS file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: Restore LFS cache
uses: actions/cache@v4
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
- name: Git LFS Pull
run: git lfs pull
- name: Check Project Node version
id: check-node-version
run: echo "node_version=$(jq -r ".volta.node" package.json)" >> $GITHUB_OUTPUT
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ steps.check-node-version.outputs.node_version }}
cache: npm
- name: Run npm ci
run: npm ci --include=dev
- name: Get GitHub App Token
if: github.event_name == 'pull_request_target'
uses: actions/create-github-app-token@v1
id: github-app
with:
app-id: ${{ secrets.EDITOR_BOT_APP_ID }}
private-key: ${{ secrets.EDITOR_BOT_APP_PRIVATE_KEY }}
- name: Textlint to PR
if: github.event_name == 'pull_request_target'
uses: tsuyoshicho/action-textlint@v3
with:
github_token: ${{ steps.github-app.outputs.token }}
reporter: github-pr-review
textlint_flags: "src/content/**"
fail_on_error: true
- name: Set Build parameter
id: build-parameter
env:
HEAD_REF: ${{ github.head_ref }}
run: |
if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then
echo "root_url=https://${HEAD_REF}--legwiki.netlify.app" >> $GITHUB_OUTPUT
echo "is_production=false" >> $GITHUB_OUTPUT
else
echo "root_url=https://legwiki.lkj.io" >> $GITHUB_OUTPUT
echo "is_production=true" >> $GITHUB_OUTPUT
fi
- name: Run astro check
run: npm run check
- name: Run astro build
run: npm run build
env:
RAKUTEN_APPLICATION_ID: ${{ secrets.RAKUTEN_APPLICATION_ID }}
RAKUTEN_AFFILIATE_ID: ${{ secrets.RAKUTEN_AFFILIATE_ID }}
ROOT_URL: ${{ steps.build-parameter.outputs.root_url }}
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
alias: ${{ github.head_ref }}
publish-dir: './dist'
production-deploy: ${{ steps.build-parameter.outputs.is_production }}
github-token: ${{ github.token }}
enable-commit-comment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}