Improve context documentation and examples #3
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: Documentation | |
| on: | |
| pull_request: | |
| paths: | |
| - 'docs/**' | |
| - 'Example Scripts/**' | |
| - 'language_specification.md' | |
| - 'PROJECT_GUIDE.md' | |
| - 'website/**' | |
| - '.github/workflows/documentation.yml' | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'docs/**' | |
| - 'Example Scripts/**' | |
| - 'language_specification.md' | |
| - 'PROJECT_GUIDE.md' | |
| - 'website/**' | |
| - '.github/workflows/documentation.yml' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: documentation-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: | | |
| website/package-lock.json | |
| Tooling/package-lock.json | |
| - name: Install website dependencies | |
| run: npm ci --prefix website | |
| - name: Build the standalone editor | |
| run: | | |
| npm ci --prefix Tooling | |
| node website/scripts/materialize-manifest.mjs | |
| npm run build --prefix Tooling | |
| - name: Build documentation | |
| run: npm run build --prefix website | |
| - name: Upload Pages artifact | |
| if: github.event_name != 'pull_request' | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: website/build | |
| deploy: | |
| if: github.event_name != 'pull_request' | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |