-
Notifications
You must be signed in to change notification settings - Fork 66
57 lines (46 loc) · 1.41 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
name: OpenWisp2 Docs
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
name: Python==3.9
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.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- 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: ./run-qa-checks
- name: Setup Google Cloud
if: ${{ github.event_name=='push' }}
uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.GCS_DOWNLOADS_SERVICE_ACCOUNT_JSON }}
project_id: ${{ secrets.GCS_PROJECT_ID }}
export_default_credentials: true
- name: Deploy pages to openwisp.io/docs
if: ${{ github.event_name=='push' }}
run: gsutil -m rsync -r ${{ env.SRC_URL }}/_build/html ${{ env.DST_URL }}
env:
SRC_URL: /home/runner/work/openwisp2-docs/openwisp2-docs
DST_URL: gs://${{ secrets.GCS_DOCS_BUCKET_NAME }}/docs