46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
name: Build binaries, docs and publish to dev folder
|
|
on:
|
|
workflow_dispatch:
|
|
jobs:
|
|
build-upload:
|
|
runs-on: ubuntu-latest
|
|
name: Build and upload Assets to Release
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.7"
|
|
- name: Set outputs
|
|
id: vars
|
|
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install platformio requests shutils
|
|
npm install
|
|
- name: Set soft version tag from git
|
|
run: sed -i "s/version_tag/${steps.vars.outputs.sha_short}/g" main/User_config.h
|
|
- name: Run PlatformIO
|
|
run: platformio run
|
|
- name: Prepare Release Assets
|
|
run: |
|
|
sudo apt install rename
|
|
./scripts/prepare_deploy.sh
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: "14.x"
|
|
- name: Set doc version tag from git
|
|
run: sed -i "s/version_tag/${{steps.vars.outputs.sha_short}}/g" docs/.vuepress/config.js
|
|
- name: Build documentation
|
|
run: |
|
|
python ./scripts/gen_wu_dev.py
|
|
npm run docs:build
|
|
- name: Deploy to GitHub Pages
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./docs/.vuepress/dist
|
|
destination_dir: dev
|
|
cname: docs.openmqttgateway.com |