add cmdrun #386
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-docs | |
on: | |
workflow_dispatch: | |
push: | |
branches-ignore: master | |
paths: | |
- 'documentation/docs/**' | |
jobs: | |
build: | |
runs-on: ubuntu-20.04-16core #custom-linux | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Dependencies (Linux) | |
run: sudo apt-get update && sudo apt-get install -y build-essential curl wget libssl-dev libudev-dev squashfs-tools protobuf-compiler | |
- name: Install rsync | |
run: sudo apt-get install rsync | |
- uses: rlespinasse/github-slug-action@v3.x | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install Rust stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Build all binaries | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --workspace --release | |
- name: Install mdbook | |
# TODO change to use script instead | |
run: cd documentation && ./install_mdbook_deps.sh # cargo install mdbook | |
# - name: Install mdbook plugins | |
# run: | | |
# cargo install mdbook-variables | |
# cargo install mdbook-admonish | |
# cargo install mdbook-last-changed | |
# cargo install mdbook-theme | |
# cargo install mdbook-linkcheck | |
# TODO check if this makes sense / you aren't blowing other things away | |
- name: Remove existing Nym config directory (`~/.nym/`) | |
run: cd documentation && ./remove_existing_config.sh | |
continue-on-error: false | |
# TODO remove cd, we should already be there from the last command? | |
- name: Build all projects in documentation/ & move to ~/dist/docs/ | |
run: cd documentation && ./build_all_to_dist.sh | |
continue-on-error: false | |
- name: Deploy branch to CI www | |
continue-on-error: true | |
uses: easingthemes/ssh-deploy@main | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.CI_WWW_SSH_PRIVATE_KEY }} | |
ARGS: "-rltgoDzvO --delete" | |
SOURCE: "dist/docs/" | |
REMOTE_HOST: ${{ secrets.CI_WWW_REMOTE_HOST }} | |
REMOTE_USER: ${{ secrets.CI_WWW_REMOTE_USER }} | |
TARGET: ${{ secrets.CI_WWW_REMOTE_TARGET }}/docs-${{ env.GITHUB_REF_SLUG }} | |
EXCLUDE: "/node_modules/" | |
- name: Matrix - Node Install | |
run: npm install | |
working-directory: .github/workflows/support-files | |
- name: Matrix - Send Notification | |
env: | |
NYM_NOTIFICATION_KIND: ci-docs | |
NYM_PROJECT_NAME: "Docs CI" | |
NYM_CI_WWW_BASE: "${{ secrets.NYM_CI_WWW_BASE }}" | |
NYM_CI_WWW_LOCATION: "docs-${{ env.GITHUB_REF_SLUG }}" | |
GIT_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}" | |
GIT_BRANCH: "${GITHUB_REF##*/}" | |
MATRIX_SERVER: "${{ secrets.MATRIX_SERVER }}" | |
MATRIX_ROOM: "${{ secrets.MATRIX_ROOM_DOCS }}" | |
MATRIX_USER_ID: "${{ secrets.MATRIX_USER_ID }}" | |
MATRIX_TOKEN: "${{ secrets.MATRIX_TOKEN }}" | |
MATRIX_DEVICE_ID: "${{ secrets.MATRIX_DEVICE_ID }}" | |
IS_SUCCESS: "${{ job.status == 'success' }}" | |
uses: docker://keybaseio/client:stable-node | |
with: | |
args: .github/workflows/support-files/notifications/entry_point.sh |