Merge pull request #21 from SentinelOps-CI/pr/1-core-plumbing #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: Publish Understanding Pack | |
| on: | |
| workflow_dispatch: {} | |
| push: | |
| branches: [main] | |
| paths: ["tours/**", "docs/**", "maps/**"] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: { python-version: "3.11" } | |
| - run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install -e ".[dev,examples]" | |
| u pack publish | |
| - name: Prepare site | |
| run: | | |
| mkdir -p site/docs | |
| echo "<h1>Understanding Pack</h1><ul>" > site/index.html | |
| for f in docs/glossary.md docs/understanding-dashboard.md; do | |
| if test -f "$f"; then | |
| cp "$f" "site/$f" | |
| echo "<li><a href='/$f'>$f</a></li>" >> site/index.html | |
| fi | |
| done | |
| # Optional nicety: delta.svg may be absent on pack-only publishes. | |
| if test -f maps/delta.svg; then | |
| cp maps/delta.svg site/delta.svg | |
| echo "<li><a href='/delta.svg'>delta.svg</a></li>" >> site/index.html | |
| fi | |
| echo "</ul>" >> site/index.html | |
| - uses: actions/upload-pages-artifact@v3 | |
| with: { path: "site" } | |
| deploy: | |
| needs: build | |
| permissions: | |
| pages: write | |
| id-token: write | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |