Skip to content

doc_changes

doc_changes #311

Workflow file for this run

name: 'Update docs'
on:
repository_dispatch:
types: [doc_changes]
jobs:
update-docs:
runs-on: ubuntu-latest
outputs:
branch: ${{ steps.branch.outputs.branch }}
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag: v4.1.1
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # tag: v4.0.1
with:
node-version: 20
- name: Install dependencies
uses: bahmutov/npm-install@d476752204653fb5cce6c09db0eaf220761f5d9e # tag: v1.8.37
- name: 'Prebuild'
run: 'yarn pre-build ${{ github.event.client_payload.sha }} ${{ github.event.client_payload.branch}}'
- name: 'Push changes or create PR'
run: 'yarn process-docs-changes'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: branch
run: echo "branch=$(git branch --show-current)" >> $GITHUB_OUTPUT
# GitHub will not kick the "push-XXX" workflow so we have to publish from here
build-and-deploy:
needs: [update-docs]
# If we are in the "main" branch, it means we have pushed the changed directly and should deploy
if: ${{ needs.update-docs.outputs.branch == 'main' }}
uses: electron/website/.github/workflows/build-and-deploy.yml@main
with:
branch: main
secrets:
SAS: ${{ secrets.SAS }}