-
Notifications
You must be signed in to change notification settings - Fork 134
48 lines (43 loc) · 1.26 KB
/
pages.yml
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
37
38
39
40
41
42
43
44
45
46
47
48
name: Deploy GH Pages
on:
push:
branches:
- master
paths:
- 'docs/*.md'
- 'docs/quickstart'
- 'docs/developer'
- 'docs/design'
- '*.md'
- '.github/workflows/pages.yml'
jobs:
deploy-gh-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout master
uses: actions/[email protected]
with:
path: master
- name: Checkout gh-pages branch
uses: actions/[email protected]
with:
ref: 'gh-pages'
path: gh-pages
- name: Copy site files
run: |
cp master/docs/*.md gh-pages/
rm gh-pages/docs-readme.md
cp -r master/docs/quickstart gh-pages/
cp -r master/docs/developer gh-pages/
cp -r master/docs/design gh-pages/
cp master/CODE_OF_CONDUCT.md master/CONTRIBUTING.md gh-pages/_pages/
- name: Commit GH Pages
run: |
cd gh-pages
git config user.name armada-admin
git config user.email [email protected]
git add . _pages
git diff --quiet && git diff --staged --quiet || git commit -m "Updating Github Pages branch with latest Master changes"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}