Skip to content

fix(engine): gp.run and model steps say which tool parameters they ignore (#2307) #9696

fix(engine): gp.run and model steps say which tool parameters they ignore (#2307)

fix(engine): gp.run and model steps say which tool parameters they ignore (#2307) #9696

Workflow file for this run

# Builds the docs and the web app on every pull request, forks included. This workflow runs the
# pull request's code with no secrets and a read-only token, and hands its output over as artifacts:
#
# preview-pr - the pull request's number (every run, closed ones too)
# preview-site - the built site (open pull requests)
#
# docs-preview-publish.yml, started when this workflow finishes, holds the deploy key and publishes
# the site to https://preview.rustgis.app/pr-<N>/, or removes a closed pull request's preview. It
# runs no pull request code. Splitting the two is what lets fork pull requests get a preview:
# GitHub gives a fork's `pull_request` run no secrets. A fork's preview is published only once a
# maintainer approves the commit, by adding the `preview` label or re-running this workflow.
name: docs-preview
on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened, closed, labeled]
permissions:
contents: read
# Another label's run does nothing, and gets its own group so it doesn't cancel a build.
concurrency:
group: docs-preview-${{ github.event.pull_request.number }}${{ github.event.action == 'labeled' && github.event.label.name != 'preview' && format('-{0}', github.run_id) || '' }}
cancel-in-progress: true
jobs:
build:
if: >-
github.event.action != 'closed' &&
(github.event.action != 'labeled' || github.event.label.name == 'preview')
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- uses: astral-sh/setup-uv@68559e99cc807c1eb7e9238fd43a15bba460eec2 # v10.3.3
with:
enable-cache: false
- name: Build docs with Zensical
run: |
uv venv --python 3.12
uv pip install -r requirements_docs.txt
.venv/bin/zensical build
# The preview is not the production site.
rm -f site/CNAME
# Production serves the app from web.rustgis.app (web-deploy.yml); previews include it
# at /app/ so a pull request's web build can be tried before merging.
- uses: dtolnay/rust-toolchain@b725eda525362e7cf34af9a7243cac1e3f01a7ec # stable
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # v2
with:
# main's build of the same app (web-deploy.yml): a preview starts warm, and saves no cache
# that only its own pull request could restore.
shared-key: web
save-if: false
- name: Build the web app
run: |
# Pinned Trunk release, checksum-verified, installed outside root-owned directories.
curl -sSfL -o "$RUNNER_TEMP/trunk.tar.gz" https://github.com/trunk-rs/trunk/releases/download/v0.21.14/trunk-x86_64-unknown-linux-gnu.tar.gz
echo "f2b4680cd239693a646a2795e4633c625328d7b2a044fbe749fa3a2fe9e7036b $RUNNER_TEMP/trunk.tar.gz" | sha256sum -c -
mkdir -p "$RUNNER_TEMP/bin" && tar xzf "$RUNNER_TEMP/trunk.tar.gz" -C "$RUNNER_TEMP/bin" trunk
export PATH="$RUNNER_TEMP/bin:$PATH"
cd apps/rustgis-web
trunk build --release --public-url ./
# No service worker: previews share one origin, where a cached app could be replaced by
# another preview's code (docs-preview-publish.yml marks the app as a preview).
mkdir -p ../../site/app
cp -r ../../dist/web/. ../../site/app/
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: preview-site
path: site
retention-days: 3
# The publishing workflow reads the pull request's number from here and checks it against the
# GitHub API (a fork's run can't be trusted to name its own pull request).
pr-number:
if: github.event.action != 'labeled' || github.event.label.name == 'preview'
runs-on: ubuntu-latest
steps:
- name: Record the pull request number
env:
PR: ${{ github.event.pull_request.number }}
run: |
mkdir -p preview-pr
printf '%s\n' "$PR" > preview-pr/pr.txt
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: preview-pr
path: preview-pr
retention-days: 3