Skip to content

build: change package manager (#1109) #148

build: change package manager (#1109)

build: change package manager (#1109) #148

Workflow file for this run

name: Generate Docs
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'vue-press/**'
jobs:
merge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: devmasx/merge-branch@v1.3.1
with:
type: now
from_branch: main
target_branch: docs
github_token: ${{ github.token }}
generate-docs:
runs-on: ubuntu-latest
needs: merge
defaults:
run:
working-directory: vue-press
steps:
- name: Checkout docs
uses: actions/checkout@v3
with:
ref: docs
- uses: pnpm/action-setup@v2
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '18'
- name: restore node_modules
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-18-${{ hashFiles('**/pnpm-lock.yml') }}
- name: Install Node Dependencies
run: npm ci
- name: Build project
run: |
npm run build
touch ../docs/.nojekyll
- name: Config git user
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- name: Commit changes
run: |
cd ..
echo "!docs/" >> .gitignore
git add docs
git commit -m'docs: updated docs'
git push --force