| 1 |
name: Deploy docs |
| 2 |
|
| 3 |
|
| 4 |
on: |
| 5 |
push: |
| 6 |
branches: |
| 7 |
- main |
| 8 |
paths: |
| 9 |
- 'docs/**' |
| 10 |
|
| 11 |
jobs: |
| 12 |
deploy: |
| 13 |
runs-on: ubuntu-latest |
| 14 |
environment: docs-deployment |
| 15 |
steps: |
| 16 |
- name: Checkout |
| 17 |
uses: actions/checkout@v6 |
| 18 |
with: |
| 19 |
repository: 'pyocd/pyocd-website-source' |
| 20 |
token: ${{ secrets.DEPLOY_TOKEN }} |
| 21 |
submodules: true |
| 22 |
|
| 23 |
- name: Configure user |
| 24 |
run: | |
| 25 |
git config --global user.email "[email protected]" |
| 26 |
git config --global user.name "pyocd-bot" |
| 27 |
|
| 28 |
- name: Update pyocd submodule |
| 29 |
run: | |
| 30 |
cd pyocd |
| 31 |
git fetch origin |
| 32 |
git switch --detach ${{ github.event.after }} |
| 33 |
|
| 34 |
- name: Commit and push |
| 35 |
run: | |
| 36 |
git add pyocd |
| 37 |
git commit -m "submodule: pyocd: sync to commit ${{ github.event.after }}" |
| 38 |
git push origin |
| 39 |
|