Skip to content

doc_changes

doc_changes #308

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 }}
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # tag: v3.3.0
- uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # tag: v3.6.0
with:
node-version: 16
- name: Install dependencies
uses: bahmutov/npm-install@8add8c6d2c8586964896d9fdc639e021312a643f # tag: v1.8.28
- 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 }}