10 types: [synchronize, opened]
15 runs-on: ubuntu-latest
18 CI_BRANCH_BASE: develop
21 - uses: actions/checkout@v2
23 - uses: './.github/actions/reusable-prepare-peertube-build'
27 - name: Angular bundlewatch
28 uses: jackyef/bundlewatch-gh-action@master
30 build-script: npm run build -- --analyze-bundle
32 bundlewatch-github-token: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
34 - name: PeerTube code stats
35 if: github.event_name != 'pull_request'
37 wget "https://github.com/boyter/scc/releases/download/v3.0.0/scc-3.0.0-x86_64-unknown-linux.zip"
38 unzip "scc-3.0.0-x86_64-unknown-linux.zip"
39 ./scc --format=json --exclude-dir .git,node_modules,client/node_modules,client/dist,dist,yarn.lock,client/yarn.lock,client/src/locale,test1,test2,test3,client/src/assets/images,config,storage,server/tests/fixtures,support/openapi,.idea,.vscode,docker-volume,ffmpeg-3,ffmpeg-4 > ./scc.json
41 - name: PeerTube client stats
42 if: github.event_name != 'pull_request'
44 node dist/scripts/client-build-stats.js > client-build-stats.json
46 - name: PeerTube client lighthouse report
47 if: github.event_name != 'pull_request'
49 sudo apt-get install chromium-browser
50 sudo npm install -g lighthouse
51 lighthouse --chrome-flags="--headless" https://peertube2.cpy.re --output=json --output-path=./lighthouse.json
54 if: github.event_name != 'pull_request'
56 cat client-build-stats.json
61 if: github.event_name != 'pull_request'
62 uses: './.github/actions/reusable-deploy'
64 source: lighthouse.json client-build-stats.json scc.json
65 destination: peertube-stats
66 knownHosts: ${{ secrets.STATS_DEPLOYEMENT_KNOWN_HOSTS }}
67 deployKey: ${{ secrets.STATS_DEPLOYEMENT_KEY }}
68 deployUser: ${{ secrets.STATS_DEPLOYEMENT_USER }}
69 deployHost: ${{ secrets.STATS_DEPLOYEMENT_HOST }}