repository template for Node.js & TypeScript projects
at vite8 53 lines 1.1 kB view raw
1name: Documentation 2 3on: 4 push: 5 branches: 6 - main 7 pull_request: 8 branches: 9 - main 10 workflow_dispatch: 11 12concurrency: 13 group: 'pages' 14 cancel-in-progress: false 15 16jobs: 17 build: 18 permissions: 19 contents: read 20 runs-on: ubuntu-latest 21 steps: 22 - uses: actions/checkout@v6 23 - name: Install Node.js 24 uses: actions/setup-node@v6 25 with: 26 node-version: latest 27 cache: 'npm' 28 - name: Install dependencies 29 run: npm ci --verbose 30 - name: Setup Pages 31 id: pages 32 uses: actions/configure-pages@v5 33 - name: Build documentation 34 run: npm run docs 35 - name: Upload artifact 36 uses: actions/upload-pages-artifact@v4 37 with: 38 path: ./dist/typedoc 39 40 deploy: 41 permissions: 42 pages: write 43 id-token: write 44 environment: 45 name: github-pages 46 url: ${{ steps.deployment.outputs.page_url }} 47 runs-on: ubuntu-latest 48 needs: build 49 if: github.event_name != 'pull_request' 50 steps: 51 - name: Deploy to GitHub Pages 52 id: deployment 53 uses: actions/deploy-pages@v4