Skip to content

chore: ci naming

chore: ci naming #3

name: Build Docs to Netlify
on:
push:
branches:
- 'main'
jobs:
build:
name: Build
runs-on: ubuntu-22.04
environment:
name: Production Docs
url: https://nolebase-plugins.ayaka.io
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
run_install: false
version: 8
- name: Obtain pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Obtain pnpm store cache
uses: actions/cache@v3
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 --frozen-lockfile
- name: Build docs
run: pnpm docs:build
- name: Push to Netlify
id: netlify-deployment
uses: netlify/actions/cli@master
timeout-minutes: 10
with:
args: deploy --dir=.vitepress/dist --functions=netlify/functions --prod
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}