1
- # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2
- # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
-
4
- name : Create offline documentation to release
1
+ name : Update documentation website
5
2
6
3
on :
7
4
push :
8
5
branches : [ master ]
9
6
workflow_dispatch :
10
7
11
8
jobs :
12
- build :
9
+ build-docs :
10
+ name : " Generate HTML"
13
11
runs-on : ubuntu-latest
14
- strategy :
15
- matrix :
16
- python-version : [ 3.8 ]
17
-
18
12
steps :
19
13
- uses : actions/checkout@v4
20
- - name : Set up Python ${{ matrix.python-version }}
14
+ with :
15
+ ref : main
16
+ fetch-depth : 1
17
+
18
+ - name : Set up Python
21
19
uses : actions/setup-python@v5
22
20
with :
23
- python-version : ${{ matrix.python-version }}
21
+ python-version : 3.8
22
+
24
23
- name : Install dependencies
25
24
run : |
26
- python -m pip install --upgrade pip
27
- pip install setuptools wheel
28
- pip install -r requirements.txt
29
- - name : Run mkdocs --clean
30
- run : |
31
- mkdocs build --clean
25
+ pip install --upgrade pip
26
+ pip install setuptools wheel -r requirements.txt
27
+
28
+ - name : Build docs
29
+ run : mkdocs build --clean
32
30
33
- # - name: Upload pdf
34
- # uses: actions/upload-artifact@v4
35
- # with:
36
- # name: artifact
37
- # path: site/pdf/document.pdf
38
- # PDF is not built, no need to upload
31
+ - name : Install SSH key
32
+ uses : shimataro/ssh-key-action@v2
33
+ with :
34
+ key : ${{ secrets.KEY_UPLOAD }}
35
+ known_hosts : ${{ secrets.KNOWN_HOSTS_ARMBIAN_UPLOAD }}
36
+ if_key_exists : replace
39
37
40
- # deploy:
41
- # needs: [ build ]
42
- # runs-on: ubuntu-20.04
43
- # env:
44
- # TZ: GMT
45
- # steps:
46
- # - uses: actions/checkout@v4
47
- # - uses: actions/download-artifact@v4
48
- # with:
49
- # name: artifact
50
- # - name: Add
51
- # run: |
52
- # ls -l
53
- # git pull
54
- # git add document.pdf
55
- # - name: Commit files
56
- # run: |
57
- # git config --local user.email "[email protected] "
58
- # git config --local user.name "Armbianworker"
59
- # git commit --allow-empty -m "Update github actions" -a
60
- # - name: Push changes
61
- # uses: ad-m/github-push-action@master
62
- # with:
63
- # repo-token: ${{ secrets.GITHUB_TOKEN }}
64
- # branch: ${{ github.ref }}
65
- # - name: Declare vars
66
- # id: vars
67
- # shell: bash
68
- # run: |
69
- # echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
70
- # echo "timenow=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
71
- # - name: Rename release artifact
72
- # shell: bash
73
- # run: |
74
- # mv -v document.pdf armbian-document-${{ steps.vars.outputs.sha_short }}.pdf
75
- # - name: Create Release
76
- # uses: ncipollo/release-action@v1
77
- # with:
78
- # tag: ${{ steps.vars.outputs.sha_short }}
79
- # name: ${{ steps.vars.outputs.timenow }}-${{ steps.vars.outputs.sha_short }}
80
- # draft: false
81
- # prerelease: false
82
- # token: ${{ secrets.GITHUB_TOKEN }}
83
- # artifacts: armbian-document-${{ steps.vars.outputs.sha_short }}.pdf
84
- # artifactContentType: application/pdf
38
+ - name : Deploy to servers
39
+ timeout-minutes : 10
40
+ run : |
41
+ rsync -e "ssh -p 2222 -o StrictHostKeyChecking=accept-new" \
42
+ --progress -a site/ [email protected] :storage/docs.armbian.com
0 commit comments