Skip to content

chore(deps): bump astral-sh/setup-uv from 8.1.0 to 8.3.0 #89

chore(deps): bump astral-sh/setup-uv from 8.1.0 to 8.3.0

chore(deps): bump astral-sh/setup-uv from 8.1.0 to 8.3.0 #89

Workflow file for this run

name: Generate and publish documentation
on:
workflow_dispatch:
workflow_call:
secrets:
GITHUB_TOKEN:

Check failure on line 7 in .github/workflows/publish-docs.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish-docs.yml

Invalid workflow file

secret name `GITHUB_TOKEN` within `workflow_call` can not be used since it would collide with system reserved name
required: true
permissions: { }
env:
GITHUB_PAGES_BRANCH: gh-pages
jobs:
publish-docs:
permissions:
contents: write # Needed to push to gh-pages branch
runs-on: ubuntu-24.04
environment:
name: docs-prod
steps:
- name: Checkout code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0
with:
enable-cache: true
- name: Set up Python
run: uv python install
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: Generate CLI reference
run: |
uv run typer src/ecalc_cli/main.py utils docs > ./docs/docs/about/getting_started/cli/cli_reference.md
- name: Generate JSON Schema
run: |
cd src
uv run python generate_json_schema.py > ../docs/docs/about/getting_started/yaml/ecalc_json_schema.json
- name: Setup node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 24
cache: npm
cache-dependency-path: docs/package-lock.json
- name: Install dependencies
working-directory: ./docs
run: npm ci --ignore-scripts
- name: Build website
working-directory: ./docs
run: npm run build
- name: Push static files to Github Pages branch
run: |
cd docs/build
CREATED_FROM_REF=$(git rev-parse --short HEAD)
git init
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git checkout -b $GITHUB_PAGES_BRANCH
git remote add $GITHUB_PAGES_BRANCH https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/equinor/ecalc
git add .
git commit -m "Built from commit '$CREATED_FROM_REF'"
git push -f --set-upstream gh-pages gh-pages