First pass at reworking the actions #1
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: Publish templates | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Publish templates and generate documentation | |
uses: devcontainers/action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
publish-templates: "true" | |
base-path-to-templates: "./src" | |
generate-docs: "true" | |
- name: Update the root readme | |
run: .github/scripts/update_root_readme.py | |
- name: Commit changes to the docs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config --global user.email github-actions[bot]@users.noreply.github.com | |
git config --global user.name github-actions[bot] | |
find . -name README.md | xargs -n1 git add | |
if git status --porcelain | grep --quiet README.md; then | |
git commit -m "Automated documentation update [skip ci]" | |
git push | |
else | |
echo "No changes to commit" | |
fi |