chore(deps): bump zizmorcore/zizmor-action from 0.5.7 to 0.6.0 #130
Workflow file for this run
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: Generate and publish documentation | ||
| on: | ||
| workflow_dispatch: | ||
| workflow_call: | ||
| secrets: | ||
| GITHUB_TOKEN: | ||
| 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@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.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 | ||