Skip to content

Commit

Permalink
workflows: add deploy-docs workflow to auto update website on docs ch…
Browse files Browse the repository at this point in the history
…anges
  • Loading branch information
flit committed May 29, 2022
1 parent b870b8b commit c985e41
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy docs

# Only run when docs are modified on the main branch.
on:
push:
branches:
- main
paths:
- 'docs/**'

jobs:
deploy:
runs-on: ubuntu-latest
environment: docs-deployment
steps:
- name: Checkout
uses: actions/checkout@v3
with:
repository: 'pyocd/pyocd-website-source'
token: ${{ secrets.DEPLOY_TOKEN }}
submodules: true

- name: Configure user
run: |
git config --global user.email "[email protected]"
git config --global user.name "pyocd-bot"
- name: Update pyocd submodule
run: |
cd pyocd
git fetch origin
git switch --detach ${{ github.event.after }}
- name: Commit and push
run: |
git add pyocd
git commit -m "submodule: pyocd: sync to commit ${{ github.event.after }}"
git push origin

0 comments on commit c985e41

Please sign in to comment.