Merge pull request #7 from crup/next #30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 1. Checkout source | |
| uses: actions/checkout@v4 | |
| - name: 2. Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.30.2 | |
| - name: 3. Setup Node 24 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| - name: 4. Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: 5. Build package | |
| id: package | |
| run: pnpm build | |
| - name: 6. Build Docusaurus docs | |
| id: docs | |
| run: pnpm docs:build | |
| - name: 7. Configure GitHub Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: 8. Upload Pages artifact | |
| id: artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: docs-site/build | |
| - name: 9. Deploy GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| - name: Docs summary | |
| if: always() | |
| run: | | |
| { | |
| echo "## Docs pipeline" | |
| echo | |
| echo "| Stage | Result |" | |
| echo "| --- | --- |" | |
| echo "| Build package | ${{ steps.package.outcome }} |" | |
| echo "| Build Docusaurus docs | ${{ steps.docs.outcome }} |" | |
| echo "| Configure Pages | ${{ steps.pages.outcome }} |" | |
| echo "| Upload artifact | ${{ steps.artifact.outcome }} |" | |
| echo "| Deploy Pages | ${{ steps.deployment.outcome }} |" | |
| echo | |
| echo "Docs URL: https://crup.github.io/react-timer-hook/" | |
| } >> "$GITHUB_STEP_SUMMARY" |