Update 01.问答.md #307
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [10.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Build project | |
env: | |
CODING_USER: ${{ secrets.CODING_USER }} | |
CODING_TOKEN: ${{ secrets.CODING_TOKEN }} | |
run: yarn --frozen-lockfile && yarn run deploy | |
# - name: Upload COS | |
# uses: zkqiang/[email protected] | |
# with: | |
# args: list / -ar && delete -r -f / && upload -r ./docs/.vuepress/dist/ / | |
# secret_id: ${{ secrets.TENCENT_CLOUD_SECRET_ID }} | |
# secret_key: ${{ secrets.TENCENT_CLOUD_SECRET_KEY }} | |
# bucket: ${{ secrets.TENCENT_CLOUD_BUCKET }} | |
# region: ap-beijing | |
- name: Deploy to ECS | |
uses: cross-the-world/scp-pipeline@master | |
with: | |
host: ${{ secrets.ECS_HOST }} | |
user: ${{ secrets.ECS_USERNAME }} | |
pass: ${{ secrets.ECS_PASSWORD }} | |
connect_timeout: 10s | |
local: './docs/.vuepress/dist/*' | |
remote: '/var/www/html/' |