Reorganize the documentation journey #1230
Workflow file for this run
This file contains 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
# this workflow merges requests from Dependabot if tests are passing | |
# ref https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions | |
# and https://github.com/dependabot/fetch-metadata | |
name: Auto-merge | |
# `pull_request_target` means this uses code in the base branch, not the PR. | |
# on: pull_request_target | |
on: pull_request_target | |
# Dependabot PRs' tokens have read permissions by default and thus we must enable write permissions. | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
dependencies: | |
runs-on: ubuntu-latest | |
if: github.actor == 'dependabot[bot]' | |
steps: | |
- name: Fetch PR metadata | |
id: metadata | |
uses: dependabot/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Waiting for Vercel Preview | |
uses: patrickedqvist/[email protected] | |
id: waitForVercel | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
max_timeout: 300 | |
- name: Auto-merge dependabot PRs | |
# Don't merge updates to GitHub Actions versions automatically. | |
# (Some repos may wish to limit by version range (major/minor/patch), or scope (dep vs dev-dep), too.) | |
if: contains(steps.metadata.outputs.package-ecosystem, 'npm') | |
env: | |
PR_URL: ${{ github.event.pull_request.html_url }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# The "auto" flag will only merge once all of the target branch's required checks | |
# are met. Configure those in the "branch protection" settings for each repo. | |
run: gh pr merge --auto --squash "$PR_URL" |