Skip to content

docs: add new docs scaffolding to wiki #7

docs: add new docs scaffolding to wiki

docs: add new docs scaffolding to wiki #7

Workflow file for this run

name: Copy `docs/` to repo wiki
on:
push:
branches:
- main
- DEVREL-34-document-basic-usage
paths:
- "README.md"
- "docs/**"
workflow_dispatch:
jobs:
copy-docs:
name: Copy contents of `docs/` to wiki repo
runs-on: ubuntu-latest
steps:
# Checkout the present repo under the `repo/` dir
- name: Checkout base repo
uses: actions/checkout@v2
with:
path: repo
- name: Checkout wiki repo
uses: actions/checkout@v2
with:
repository: "${{ github.repository }}.wiki"
path: wiki
# Copy the contents of `docs/` to `wiki/`
# This will overwrite any existing files in the wiki repo, because
# the contents of the `wiki/` dir are deleted before the copy, ensuring
# that the wiki repo is always in sync with the base repo.
- name: Copy docs/ to wiki/
run: |
rm -rf wiki/*.md
cp -r repo/docs/* wiki/
mv wiki/README.md wiki/Home.md
- name: Commit and push changes to wiki
run: |
cd wiki
git config --global user.name "GitHub Actions Wiki Updater"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit --allow-empty -m "Update wiki to latest changes at ${GITHUB_SHA::6}"
git push