2020-05-18 18:56:15 +03:00
|
|
|
name: Publish Developer Docs
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2020-06-15 16:25:55 +03:00
|
|
|
branches:
|
|
|
|
- main
|
2020-05-18 18:56:15 +03:00
|
|
|
paths:
|
|
|
|
- 'docs/**'
|
2020-06-15 16:25:55 +03:00
|
|
|
|
2020-05-18 18:56:15 +03:00
|
|
|
jobs:
|
|
|
|
checkout:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
2020-06-24 14:05:31 +03:00
|
|
|
repository: 'enso-org/enso-org.github.io'
|
2020-05-18 18:56:15 +03:00
|
|
|
ref: 'sources'
|
2020-06-23 19:08:52 +03:00
|
|
|
token: ${{ secrets.ENSO_PAT }}
|
2020-05-18 18:56:15 +03:00
|
|
|
- name: set identity email
|
|
|
|
run: git config --global user.email "actions@github.com"
|
|
|
|
- name: set identity name
|
|
|
|
run: git config --global user.name "GitHub Actions"
|
|
|
|
- name: Checkout submodules
|
2020-06-15 16:25:55 +03:00
|
|
|
run: git submodule update --init
|
2020-05-18 18:56:15 +03:00
|
|
|
- name: Update submodules
|
|
|
|
id: status
|
|
|
|
run: |
|
2020-06-15 16:25:55 +03:00
|
|
|
git submodule update --init
|
2020-05-18 18:56:15 +03:00
|
|
|
git submodule update --remote --merge
|
|
|
|
if [ -n "$(git status --porcelain)" ]; then
|
|
|
|
echo "::set-output name=has_changes::1"
|
|
|
|
fi
|
|
|
|
- name: Push changes
|
|
|
|
run: |
|
|
|
|
git add .
|
|
|
|
git commit -m "Update submodules"
|
|
|
|
git push origin sources
|
|
|
|
if: steps.status.outputs.has_changes == '1'
|
2020-06-15 16:25:55 +03:00
|
|
|
|