ntfy/.github/workflows/docs.yaml

38 lines
1001 B
YAML

name: docs
on: [push, pull_request]
jobs:
docs:
runs-on: ubuntu-latest
steps:
-
name: Checkout ntfy code
uses: actions/checkout@v3
-
name: Checkout docs pages code
uses: actions/checkout@v3
with:
repository: binwiederhier/ntfy-docs.github.io
path: build/ntfy-docs.github.io
-
name: Build docs
run: |
make docs
ls server/docs/
-
name: Copy generated docs
run: |
echo "New docs:"
ls -1 server/docs/
echo "Existing docs:"
ls -1 build/ntfy-docs.github.io/docs/
rsync -av --delete server/docs/ build/ntfy-docs.github.io/docs/
-
name: Publish docs
run: |
cd build/ntfy-docs.github.io
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git add docs/
git commit -m "Updated docs"
git push origin main