-
Notifications
You must be signed in to change notification settings - Fork 28
36 lines (31 loc) · 1.01 KB
/
deploy-docs.yml
File metadata and controls
36 lines (31 loc) · 1.01 KB
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
name: Deploy Docs
on:
workflow_dispatch:
push:
branches: [develop]
paths: [docs/**]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v5
with:
node-version: 22
- name: Install and build
working-directory: docs
run: |
npm ci
npm run build
- name: Push to marko.build repo
run: |
git clone --depth 1 https://x-access-token:${{ secrets.MARKO_BUILD_PAT }}@github.com/markshust/marko.build.git /tmp/marko.build
rm -rf /tmp/marko.build/docs
cp -r docs/dist /tmp/marko.build/docs
cd /tmp/marko.build
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
git diff --staged --quiet && echo "No changes to deploy" && exit 0
git commit -m "Deploy docs from marko-php/marko@${GITHUB_SHA::7}"
git push