Skip to content

Update docs

Update docs #388

Workflow file for this run

name: 'Update docs'
on:
workflow_dispatch:
inputs:
version:
type: string
description: The version of the latest Electron release
required: true
concurrency: update-docs
permissions: {}
jobs:
get-latest-stable:
runs-on: ubuntu-latest
outputs:
major: ${{ steps.latest-stable-major.outputs.major }}
steps:
- run: npm install @electron/fiddle-core
- name: Get Latest Stable Major
id: latest-stable-major
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const { ElectronVersions } = await import('${{ github.workspace }}/node_modules/@electron/fiddle-core/dist/index.js');
const { latestStable } = await ElectronVersions.create(undefined, { ignoreCache: true });
core.setOutput('major', latestStable.major);
update-docs:
runs-on: ubuntu-latest
# environment: docs-updater
needs: get-latest-stable
if: ${{ startsWith(github.event.inputs.version, format('v{0}', needs.get-latest-stable.outputs.major)) }}
steps:
# - name: Generate GitHub App token
# uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
# id: generate-token
# with:
# creds: ${{ secrets.DOCS_UPDATER_GH_APP_CREDS }}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag: v4.2.2
# with:
# token: ${{ steps.generate-token.outputs.token }}
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # tag: v4.1.0
with:
node-version: 20
- name: Install dependencies
uses: bahmutov/npm-install@ec9e87262db2a1be2ca3ceb2d506c413a220542c # tag: v1.10.5
- name: Prebuild
run: |
yarn pre-build ${{ github.event.inputs.version }}
git add .
# - name: Push changes
# uses: dsanders11/github-app-commit-action@43de6da2f4d927e997c0784c7a0b61bd19ad6aac # v1.5.0
# with:
# message: 'chore: update ref to docs (🤖)'
# token: ${{ steps.generate-token.outputs.token }}