generated from devcontainers/template-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.16 KB
/
publish.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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