Update recipes.md (#1341) #17
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
name: Update Docs | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- docs/user/**/* | |
- docs/.vscode/**/* | |
- docs/assets/**/* | |
workflow_dispatch: | |
jobs: | |
update-docs: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: foambubble/foam-template | |
path: foam-template | |
- uses: actions/checkout@v3 | |
with: | |
path: foam | |
- name: Copy and fixup user docs files | |
id: copy | |
run: | | |
rm -r foam-template/docs | |
rm -r foam-template/assets | |
rm -r foam-template/.vscode | |
cp -r foam/docs/user foam-template/docs | |
cp -r foam/docs/assets foam-template/assets | |
cp -r foam/docs/.vscode foam-template/.vscode | |
# Strip autogenerated wikileaks references because | |
# they are not an appropriate default user experience. | |
(cd foam-template/docs; sed -i '/\[\/\/begin\]/,/\[\/\/end\]/d' $(find . -type f -name \*.md)) | |
# Set the commit message format | |
echo "message=Docs sync @ $(cd foam; git log --pretty='format:%h %s')" >> $GITHUB_OUTPUT | |
- uses: peter-evans/create-pull-request@v4 | |
with: | |
token: ${{ secrets.FOAM_DOCS_SYNC_TOKEN }} | |
path: foam-template | |
commit-message: ${{ steps.copy.outputs.message }} | |
branch: bot/foam-docs-sync | |
delete-branch: true | |
title: Sync docs from foam | |
body: Copy docs from main foam repo |