-
Notifications
You must be signed in to change notification settings - Fork 5
51 lines (48 loc) · 1.59 KB
/
docs-deploy.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
name: Docs deploy
on:
push:
branches: [ 'master' ]
release:
types: [ 'created' ]
workflow_dispatch:
jobs:
deploydocs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npm run docs
- name: Upload docs to Toolforge
uses: garygrossgarten/github-action-scp@dba89d858413133b6e35da91a3c989cc8cde3ad4
with:
local: /home/runner/work/twinkle-core/twinkle-core/docs
remote: /data/project/twinkle/www/static/core-docs
host: login.toolforge.org
username: ${{ secrets.TOOLFORGE_USERNAME }}
privateKey: ${{ secrets.TOOLFORGE_PRIVATE_KEY }}
rmRemote: true
dotfiles: true
versiondocs:
needs: deploydocs
runs-on: ubuntu-latest
if: ${{github.event_name == 'release'}}
steps:
- uses: actions/checkout@v2
- name: Read package.json version
uses: martinbeentjes/npm-get-version-action@master
id: get-version
- name: Save the documentation with version number
uses: garygrossgarten/github-action-ssh@2b10f41b5a33808f6d24eafd253296766308b7c4
with:
command: >-
become twinkle bash -c '
cd /data/project/twinkle/www/static;
cp -r core-docs "core-docs-${{ steps.get-version.outputs.current-version }}";
'
host: login.toolforge.org
username: ${{ secrets.TOOLFORGE_USERNAME }}
privateKey: ${{ secrets.TOOLFORGE_PRIVATE_KEY }}