Set up GH CI to fetch docs files from other repos #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: Test deployment | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| # Review gh actions docs if you want to further define triggers, paths, etc | |
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on | |
| # Allow running this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| defaults: | |
| run: | |
| shell: bash | |
| working-directory: ./docs | |
| permissions: | |
| contents: write | |
| jobs: | |
| test-deploy: | |
| name: Test deployment | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Docusaurus site | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Checkout TSC faqs | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: fairpm/tsc | |
| path: docs/external/tsc/ | |
| - name: Debug checked out files | |
| run: | | |
| echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" | |
| echo "Current directory:" | |
| pwd | |
| echo "Repo root:" | |
| ls -la "$GITHUB_WORKSPACE" | |
| echo "Docs root:" | |
| ls -la "$GITHUB_WORKSPACE/docs" | |
| echo "External:" | |
| find "$GITHUB_WORKSPACE/docs/external" -maxdepth 5 -type d -print || true | |
| echo "Expected folder:" | |
| ls -la "$GITHUB_WORKSPACE/docs/external/tsc/faqs" || true | |
| working-directory: . | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: npm | |
| cache-dependency-path: docs/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build website | |
| run: npm run build |