workflows: split CodeQL, upgrade action packages #119
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: garygrossgarten/github-action-scp@8a27854bb4f124a497a67316e83783efda770119 | |
with: | |
local: ${{github.workspace}}/website/build/docs.zip | |
remote: /data/project/mwn/docs.zip | |
host: login.toolforge.org | |
username: ${{secrets.TOOLFORGE_USERNAME}} | |
privateKey: ${{secrets.TOOLFORGE_PRIVATE_KEY}} | |
rmRemote: true | |
- name: Unzip | |
uses: garygrossgarten/github-action-ssh@915e492551885a89131e21d85f2e043c96abff80 | |
with: | |
command: | | |
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}} | |
privateKey: ${{secrets.TOOLFORGE_PRIVATE_KEY}} |