page: fix backlinks() and transclusions() to work for missing and orp… #127
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docs deploy | |
on: | |
push: | |
branches: [master] | |
paths: | |
- 'src/**' | |
- 'website/**' | |
- 'README.md' | |
- '.github/workflows/docs-deploy.yml' | |
workflow_dispatch: | |
jobs: | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
npm ci | |
cd website && npm install && cd - | |
- name: Build documentation | |
run: cd website && npm run build && cd - | |
- name: Build API documentation | |
run: npm run docs:api | |
- name: Zip docs | |
run: | | |
mv docs website/build/docs/api | |
cd website/build | |
zip -r docs.zip . | |
- name: Copy docs to Toolforge | |
uses: appleboy/scp-action@9ba62064d28ce0897a970e72cdfe30b9fde2fe48 | |
with: | |
source: ${{github.workspace}}/website/build/docs.zip | |
strip_components: 4 | |
target: /data/project/mwn | |
host: login.toolforge.org | |
username: ${{secrets.TOOLFORGE_USERNAME}} | |
key: ${{secrets.TOOLFORGE_PRIVATE_KEY}} | |
- name: Unzip | |
uses: appleboy/ssh-action@551964ebda1034f0b5449d74db25c42e371ca1f7 | |
with: | |
script: | | |
cd /data/project/mwn/www/static | |
shopt -s extglob | |
rm -r -- !(coverage) | |
unzip /data/project/mwn/docs.zip -d . | |
rm /data/project/mwn/docs.zip | |
host: login.toolforge.org | |
username: ${{secrets.TOOLFORGE_USERNAME}} | |
key: ${{secrets.TOOLFORGE_PRIVATE_KEY}} |