typo
[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 - name: Install dependencies
40 run: |
41 sudo apt-get update -y
42 sudo apt-get install -y \
43 php-cli \
44 php-dev \
45 php-bz2 \
46 libpq-dev \
47 libcurl4-openssl-dev \
48 libidn11-dev \
49 libidn2-0-dev \
50 libicu-dev \
51 libevent-dev \
52 libbrotli-dev
53 - name: Install referenced php extensions for stubs
54 run: |
55 for ext in raphf http pq; do
56 phar=$(
57 curl -sSL -H Accept:application/json replicator.pharext.org?$ext \
58 | jq -r 'to_entries[-1].value.".bz2".phar'
59 )
60 curl -sSLO replicator.pharext.org/$phar
61 php $phar -s
62 done
63 - name: Install composer dependencies
64 run: |
65 composer install
66 - name: Generate HTML
67 run: |
68 mkdir html
69 cd html
70 ./bin/ref2html . ../refs/*
71 - name: Generate STUBs
72 run: |
73 cd html
74 for ext in http pq; do
75 ../bin/ref2stub $ext
76 done
77 - uses: crazy-max/ghaction-github-pages@v2
78 if: success()
79 env:
80 GH_PAT: ${{ secrets.PUBLISH_SECRET }}
81 with:
82 jekyll: false
83 keep_history: true
84 target_branch: master
85 allow_empty_commit: false
86 build_dir: html
87 repo: mdref/mdref.github.io
88 fqdn: mdref.m6w6.name
89 dry_run: true
90