Merge pull request #37 from aave/sams/devops-938-implement-dependency… #73
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: Deploy documentation | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| build-typedoc: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - name: Install PNPM | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| run_install: false | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Get PNPM store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$HOME/.local/share/pnpm/store" >> $GITHUB_ENV | |
| - name: Setup PNPM cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: pnpm install --no-frozen-lockfile | |
| - name: Install gh-pages globally | |
| run: pnpm add -g gh-pages | |
| - name: Generate documentation | |
| run: pnpm run docs | |
| - name: Upload generated docs artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: typedoc-html | |
| path: ./docs/documentation/html | |
| deploy-typedoc: | |
| needs: build-typedoc | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download documentation artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: typedoc-html | |
| path: ./docs/documentation/html | |
| - name: Upload GitHub Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./docs/documentation/html | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |