Skip to content

[feature] Pull docs from OpenWISP modules to create a unified documentation Website #107 #319

[feature] Pull docs from OpenWISP modules to create a unified documentation Website #107

[feature] Pull docs from OpenWISP modules to create a unified documentation Website #107 #319

Workflow file for this run

---
name: OpenWISP Docs
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Python==3.10
runs-on: ubuntu-22.04
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Upgrade python system packages
run: pip install -U pip wheel
- name: Install test dependencies
run: |
pip install -U -r requirements.txt
pip install pylinkvalidator
- name: Install npm dependencies
run: sudo npm install -g stylelint
- name: QA checks
run: PRODUCTION=1 ./run-qa-checks
# TODO: Uncomment the CI condition before merging
- name: Setup Google Cloud
# if: ${{ github.event_name=='push' }}
uses: 'google-github-actions/auth@v2'
with:
credentials_json: ${{ secrets.GCS_DOWNLOADS_SERVICE_ACCOUNT_JSON }}
project_id: ${{ secrets.GCS_PROJECT_ID }}
export_environment_variables: true
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
# TODO: Uncomment the CI condition before merging
- name: Deploy pages to openwisp.io/docs
# if: ${{ github.event_name=='push' }}
run: |
gsutil -m rsync -r ${{ env.SRC_URL }} ${{ env.DST_URL }}
env:
SRC_URL: /home/runner/work/openwisp-docs/openwisp-docs/_build/docs/__new__/
DST_URL: gs://${{ secrets.GCS_DOCS_BUCKET_NAME }}/docs/__new__/