1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- name: deploy docs to server
- on:
- push:
- branches: [ master ]
- env:
- TZ: Asia/Shanghai
- jobs:
- build:
- strategy:
- matrix:
- node-version: [14.x]
- os: [ubuntu-latest]
- include:
- - os: ubuntu-latest
- path: ~/.cache/pip
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
-
- - name: Set up Python 3.8
- id: setup-python
- uses: actions/setup-python@v2
- with:
- python-version: 3.8
-
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
-
- - name: build docs
- run: |
- pwd
- sh tools/build_docs.sh
- # docs/.vuepress/dist
- - name: deploy to server
- uses: appleboy/scp-action@master
- with:
- host: ${{ secrets.HOST }}
- username: ${{ secrets.USERNAME }}
- port: ${{ secrets.PORT }}
- password: ${{ secrets.PASSWORD }}
- source: "site/"
- target: ${{ secrets.TARGET }}
-
- - name: User Nodejs
- uses: actions/setup-node@v1
- with:
- node-version: ${{ matrix.node-version }}
-
- - name: build
- run: |
- npm install
- npm run build
- npm run deploy
|