mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2025-12-08 17:36:16 +00:00
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 6. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
62 lines
1.7 KiB
YAML
62 lines
1.7 KiB
YAML
name: Deploy docs
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Publish as version[?]:'
|
|
default: 'latest'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
docs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Setup node and restore cached dependencies
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
cache: 'pnpm'
|
|
|
|
- name: Install packages
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build specific version
|
|
run: pnpm docs:build --base /${{ github.event.inputs.version }}/
|
|
if: ${{ github.event.inputs.version != 'latest' }}
|
|
|
|
- name: Deploy to specific version
|
|
uses: JamesIves/github-pages-deploy-action@v4
|
|
if: ${{ github.event.inputs.version != 'latest' }}
|
|
with:
|
|
folder: ./docs/.vitepress/dist
|
|
branch: gh-pages
|
|
# Specific folder for this version
|
|
target-folder: ${{ github.event.inputs.version }}
|
|
clean: true
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
commit-message: 'Deploy docs for ${{ github.event.inputs.version }}'
|
|
|
|
- name: Build latest
|
|
run: pnpm docs:build
|
|
if: ${{ github.event.inputs.version == 'latest' }}
|
|
|
|
- name: Deploy to latest
|
|
if: ${{ github.event.inputs.version == 'latest' }}
|
|
uses: JamesIves/github-pages-deploy-action@v4.6.4
|
|
with:
|
|
folder: ./docs/.vitepress/dist
|
|
clean: true
|
|
clean-exclude: v*
|
|
branch: gh-pages
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
commit-message: 'Deploy docs for latest'
|