diff options
author | Chocobozzz <me@florianbigard.com> | 2021-12-01 14:14:58 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-12-03 10:14:17 +0100 |
commit | 51e9e152f7df003c65c16f822669a0674efcaf03 (patch) | |
tree | a18abdf95bfc449d8d08e4c47e8ccc7ee094bbf4 /.github/workflows/stats.yml | |
parent | f3fbbf01402fc7491e044f160edca06ef793eb50 (diff) | |
download | PeerTube-51e9e152f7df003c65c16f822669a0674efcaf03.tar.gz PeerTube-51e9e152f7df003c65c16f822669a0674efcaf03.tar.zst PeerTube-51e9e152f7df003c65c16f822669a0674efcaf03.zip |
Build nightly using github action
Diffstat (limited to '.github/workflows/stats.yml')
-rw-r--r-- | .github/workflows/stats.yml | 48 |
1 files changed, 9 insertions, 39 deletions
diff --git a/.github/workflows/stats.yml b/.github/workflows/stats.yml index e50c14720..c87e6fb77 100644 --- a/.github/workflows/stats.yml +++ b/.github/workflows/stats.yml | |||
@@ -20,24 +20,10 @@ jobs: | |||
20 | steps: | 20 | steps: |
21 | - uses: actions/checkout@v2 | 21 | - uses: actions/checkout@v2 |
22 | 22 | ||
23 | - name: Use Node.js | 23 | - uses: './.github/actions/reusable-prepare-peertube-build' |
24 | uses: actions/setup-node@v1 | ||
25 | with: | 24 | with: |
26 | node-version: '14.x' | 25 | node-version: '14.x' |
27 | 26 | ||
28 | - name: Cache Node.js modules | ||
29 | uses: actions/cache@v2 | ||
30 | with: | ||
31 | path: | | ||
32 | **/node_modules | ||
33 | key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }} | ||
34 | restore-keys: | | ||
35 | ${{ runner.OS }}-node- | ||
36 | ${{ runner.OS }}- | ||
37 | |||
38 | - name: Install dependencies | ||
39 | run: yarn install --frozen-lockfile | ||
40 | |||
41 | - name: Angular bundlewatch | 27 | - name: Angular bundlewatch |
42 | uses: jackyef/bundlewatch-gh-action@master | 28 | uses: jackyef/bundlewatch-gh-action@master |
43 | with: | 29 | with: |
@@ -73,27 +59,11 @@ jobs: | |||
73 | 59 | ||
74 | - name: Upload stats | 60 | - name: Upload stats |
75 | if: github.event_name != 'pull_request' | 61 | if: github.event_name != 'pull_request' |
76 | env: | 62 | uses: './.github/actions/reusable-deploy' |
77 | STATS_DEPLOYEMENT_KNOWN_HOSTS: ${{ secrets.STATS_DEPLOYEMENT_KNOWN_HOSTS }} | 63 | with: |
78 | STATS_DEPLOYEMENT_KEY: ${{ secrets.STATS_DEPLOYEMENT_KEY }} | 64 | source: lighthouse.json client-build-stats.json scc.json |
79 | STATS_DEPLOYEMENT_USER: ${{ secrets.STATS_DEPLOYEMENT_USER }} | 65 | destination: peertube-stats |
80 | STATS_DEPLOYEMENT_HOST: ${{ secrets.STATS_DEPLOYEMENT_HOST }} | 66 | knownHosts: ${{ secrets.STATS_DEPLOYEMENT_KNOWN_HOSTS }} |
81 | run: | | 67 | deployKey: ${{ secrets.STATS_DEPLOYEMENT_KEY }} |
82 | mkdir -p ~/.ssh | 68 | deployUser: ${{ secrets.STATS_DEPLOYEMENT_USER }} |
83 | chmod 700 ~/.ssh | 69 | deployHost: ${{ secrets.STATS_DEPLOYEMENT_HOST }} |
84 | if [ ! -z ${STATS_DEPLOYEMENT_KNOWN_HOSTS+x} ]; then | ||
85 | echo "Adding ssh key to known hosts" | ||
86 | echo -e "${STATS_DEPLOYEMENT_KNOWN_HOSTS}" > ~/.ssh/known_hosts; | ||
87 | fi | ||
88 | |||
89 | eval `ssh-agent -s` | ||
90 | |||
91 | if [ ! -z ${STATS_DEPLOYEMENT_KEY+x} ]; then | ||
92 | echo "Adding ssh reployement key" | ||
93 | ssh-add <(echo "${STATS_DEPLOYEMENT_KEY}"); | ||
94 | fi | ||
95 | |||
96 | if [ ! -z ${STATS_DEPLOYEMENT_KEY+x} ]; then | ||
97 | echo "Uploading files" | ||
98 | scp lighthouse.json client-build-stats.json scc.json ${STATS_DEPLOYEMENT_USER}@${STATS_DEPLOYEMENT_HOST}:../../web/peertube-stats; | ||
99 | fi | ||