Skip to content

Commit 0799da0

Browse files
committed
add gh-pages deployment CI script - Fix #461
1 parent 55b2903 commit 0799da0

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/deploy-pages.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: deploy-pages
2+
3+
on:
4+
push:
5+
branches:
6+
- deploy-pages
7+
- master
8+
9+
jobs:
10+
main:
11+
name: Deploy to ghpages
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
# Clone repo + submodules
17+
- name: Checkout source repo
18+
uses: actions/checkout@v3
19+
with:
20+
submodules: 'recursive'
21+
path: main
22+
23+
- name: Checkout ghpages repo
24+
uses: actions/checkout@v3
25+
with:
26+
submodules: 'recursive'
27+
ref: gh-pages
28+
path: gh-pages
29+
30+
- name: Install DMD
31+
uses: dlang-community/setup-dlang@v1
32+
with:
33+
compiler: dmd-latest
34+
35+
- name: Build HTML
36+
shell: bash
37+
run: |
38+
cd main
39+
dub upgrade
40+
dub build -b ddox -v
41+
./DGrammar/generate_html_from_libdparse.sh
42+
cp ./DGrammar/grammar.html docs/grammar.html
43+
cp -r docs/* ../gh-pages
44+
cd ../gh-pages
45+
46+
- uses: stefanzweifel/git-auto-commit-action@v4
47+
with:
48+
branch: gh-pages
49+
repository: gh-pages

0 commit comments

Comments
 (0)