diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 68e3d590c..bfb723e4d 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -3,6 +3,9 @@ name: Deploy to GitHub Pages on: push: branches: [master] + repository_dispatch: + types: [deploy] + workflow_dispatch: permissions: contents: read @@ -21,18 +24,36 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} steps: - uses: actions/checkout@v6 + with: + repository: aframevr/aframe-site + path: aframe-site - uses: actions/setup-node@v6 with: node-version: 24 + cache: 'npm' + cache-dependency-path: 'aframe-site/package-lock.json' + + - name: Install dependencies + run: npm ci --ignore-scripts --include=dev + working-directory: aframe-site + + - name: Build docs + run: npm run bumpdocs + working-directory: aframe-site + + - name: Generate site + run: npm run generate + working-directory: aframe-site - name: Generate Pagefind index - run: npx pagefind@1.5.0 --site . + run: npx pagefind --site public + working-directory: aframe-site - name: Upload Pages artifact uses: actions/upload-pages-artifact@v4 with: - path: . + path: aframe-site/public - name: Deploy to GitHub Pages id: deployment