faasjs/faasjs

View on GitHub
.github/workflows/docs.yml

Summary

Maintainability
Test Coverage
name: Docs

on:
  workflow_dispatch:
  push:
    branches:
      - main
    paths:
      - 'docs/**'
      - '.github/workflows/docs.yml'
      - 'packages/**/*.md'

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          cache: npm
          node-version: 22
      - name: Build
        run: |
          cd docs
          npm ci
          node --run build:prepare
          node --run build
          cp ./CNAME ./.vuepress/dist/CNAME
          cp ../README.md ./.vuepress/dist/README.md
          touch ./.vuepress/dist/.nojekyll
          mkdir ./.vuepress/dist/.github
          cp ../.github/FUNDING.yml ./.vuepress/dist/.github/FUNDING.yml
      - name: Deploy
        if: success()
        uses: peaceiris/actions-gh-pages@v4
        with:
          external_repository: faasjs/faasjs.github.io
          publish_branch: main
          publish_dir: ./docs/.vuepress/dist
          personal_token: ${{ secrets.FAASJS_TOKEN }}
          exclude_assets: ''