move formatting from JS to PHP
[mdref/mdref] / .github / workflows / publish.yml
index e389d4c1deb7e949bb5f917597cfaf28e66b790d..bb0413e97e808db93a25fd3296d1d637174361f4 100644 (file)
@@ -38,6 +38,9 @@ jobs:
           path: refs/raphf
       - name: Install dependencies
         run: |
+          v=8.0; for b in "" ize -config; do \
+            sudo update-alternatives --set php$b /usr/bin/php$b$v; \
+          done
           sudo apt-get update -y
           sudo apt-get install -y \
             php-cli \
@@ -52,30 +55,30 @@ jobs:
             libbrotli-dev
       - name: Install referenced php extensions for stubs
         run: |
-          for ext in raphf http pq; do
+          for ext in raphf pecl_http pq; do
             phar=$(
               curl -sSL -H Accept:application/json replicator.pharext.org?$ext \
                 | jq -r 'to_entries[-1].value.".bz2".phar'
             )
             curl -sSLO replicator.pharext.org/$phar
-            php $phar -s
+            php $(basename $phar) -qs
           done
       - name: Install composer dependencies
         run: |
           composer install
       - name: Generate HTML
         run: |
-          mkdir html
+          mkdir -p html
           cd html
-          ./bin/ref2html . ../refs/*
+          ../bin/ref2html . ../refs/*
       - name: Generate STUBs
         run: |
           cd html
           for ext in http pq; do
-            ../bin/ref2stub $ext
+            ../bin/ref2stub ../refs/$ext
           done
       - uses: crazy-max/ghaction-github-pages@v2
-        if: success()
+        if: false
         env:
           GH_PAT: ${{ secrets.PUBLISH_SECRET }}
         with:
@@ -86,5 +89,3 @@ jobs:
           build_dir: html
           repo: mdref/mdref.github.io
           fqdn: mdref.m6w6.name
-          dry_run: true
-