show changes
[mdref/mdref] / .github / workflows / publish.yml
1 name: publish
2 on:
3 push:
4 workflow_dispatch:
5 jobs:
6 publish:
7 name: publish
8 runs-on: ubuntu-latest
9 steps:
10 - uses: actions/checkout@v2
11 - uses: actions/checkout@v2
12 with:
13 repository: mdref/mdref-apfd
14 path: refs/apfd
15 - uses: actions/checkout@v2
16 with:
17 repository: mdref/mdref-http
18 path: refs/http
19 - uses: actions/checkout@v2
20 with:
21 repository: mdref/mdref-json_post
22 path: refs/json_post
23 - uses: actions/checkout@v2
24 with:
25 repository: mdref/mdref-pq
26 path: refs/pq
27 - uses: actions/checkout@v2
28 with:
29 repository: mdref/mdref-pq-gateway
30 path: refs/pq-gateway
31 - uses: actions/checkout@v2
32 with:
33 repository: mdref/mdref-propro
34 path: refs/propro
35 - uses: actions/checkout@v2
36 with:
37 repository: mdref/mdref-raphf
38 path: refs/raphf
39 - uses: actions/checkout@v2
40 with:
41 repository: mdref/mdref.github.io
42 path: html
43 - name: Install dependencies
44 run: |
45 sudo apt-get update -y
46 sudo apt-get install -y \
47 php-cli \
48 php-dev \
49 php-bz2 \
50 libpq-dev \
51 libcurl4-openssl-dev \
52 libidn11-dev \
53 libidn2-0-dev \
54 libicu-dev \
55 libevent-dev \
56 libbrotli-dev
57 - name: Install referenced php extensions for stubs
58 run: |
59 for ext in raphf pecl_http pq; do
60 phar=$(
61 curl -sSL -H Accept:application/json replicator.pharext.org?$ext \
62 | jq -r 'to_entries[-1].value.".bz2".phar'
63 )
64 curl -sSLO replicator.pharext.org/$phar
65 php $(basename $phar) -qs
66 done
67 - name: Install composer dependencies
68 run: |
69 composer install
70 - name: Generate HTML
71 run: |
72 mkdir -p html
73 cd html
74 ../bin/ref2html . ../refs/*
75 - name: Generate STUBs
76 run: |
77 cd html
78 for ext in http pq; do
79 ../bin/ref2stub ../refs/$ext
80 done
81 - name: Show changes
82 run: |
83 cd html
84 git diff
85 - uses: crazy-max/ghaction-github-pages@v2
86 if: success()
87 env:
88 GH_PAT: ${{ secrets.PUBLISH_SECRET }}
89 with:
90 jekyll: false
91 keep_history: true
92 target_branch: master
93 allow_empty_commit: false
94 build_dir: html
95 repo: mdref/mdref.github.io
96 fqdn: mdref.m6w6.name
97 dry_run: true
98