Skip to content

Merge pull request #4 from Aisen60/renovate/configure #8

Merge pull request #4 from Aisen60/renovate/configure

Merge pull request #4 from Aisen60/renovate/configure #8

name: Deploy Site
on:
workflow_dispatch:
push:
branches: [main]
schedule:
- cron: "0 5 * * *"
jobs:
build-and-deploy:
if: github.repository == 'Aisen60/vant-theme'
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
- name: Install node.js
uses: actions/setup-node@v4
with:
node-version: 16
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Build project
run: npm run build
- name: Deploy gh page
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.TOKEN_GH_PAGES }}
publish_dir: ./dist