| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- name: Deploy
- on:
- push:
- branches:
- - master
- jobs:
- build:
- strategy:
- matrix:
- os: [ubuntu-latest]
- runs-on: ${{ matrix.os }}
- steps:
- - uses: actions/checkout@v1
- - uses: xmake-io/github-action-setup-xmake@v1
- with:
- xmake-version: latest
- actions-cache-folder: '.xmake-cache'
- - name: Install SSH key
- uses: shimataro/ssh-key-action@v2
- with:
- key: ${{ secrets.SSH_KEY }}
- name: id_rsa # optional
- known_hosts: ${{ secrets.KNOWN_HOSTS }}
- - name: Installation
- run: |
- sudo apt update -y
- sudo apt install -y wget
- wget https://nodejs.org/dist/v14.15.4/node-v14.15.4-linux-x64.tar.xz
- tar -xvf node-v14.15.4-linux-x64.tar.xz
- export PATH=`pwd`/node-v14.15.4-linux-x64/bin:$PATH
- sudo npm install markdown-to-html -g
- - name: Publish documents
- run: |
- git clone [email protected]:xmake-io/xrepo-docs.git
- cd xrepo-docs
- git remote add all [email protected]:xmake-io/xrepo-docs.git
- git remote set-url --add all [email protected]:waruqi/xrepo-docs.git
- git remote set-url --add all [email protected]:xmake-io/xrepo-docs.git
- git remote set-url --add all [email protected]:xmake-io/xrepo-docs.git
- xmake l -vD `pwd`/build.lua
- git config --global user.email "[email protected]"
- git config --global user.name "ruki"
- git status
- git add -A
- git diff-index --quiet HEAD || git commit -m "autoupdate docs by xmake-repo/ci"
- git push all master
- - name: Build artifacts
- run: |
- xmake l scripts/build_artifacts.lua
|