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