add data, connector, event, and IoT examples with agent-ready docs an… #5
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 examples site | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: requirements-docs.txt | |
| - name: Set up Pages | |
| id: pages | |
| uses: actions/configure-pages@v5 | |
| - name: Install MkPages | |
| run: python -m pip install --requirement requirements-docs.txt | |
| - name: Validate examples | |
| run: python scripts/validate_examples.py | |
| - name: Generate Jekyll source | |
| run: >- | |
| mkpages build . --output .mkpages | |
| --url "https://examples.subfork.com" | |
| --baseurl "" | |
| - name: Build site | |
| uses: actions/jekyll-build-pages@v1 | |
| with: | |
| source: ./.mkpages | |
| destination: ./_site | |
| - name: Upload Pages artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./_site | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |