Skip to content

chore: Smaller fixes #10

chore: Smaller fixes

chore: Smaller fixes #10

name: C++ Build
on:
push:
branches:
- main
- init
tags:
- '*'
pull_request:
branches:
- main
jobs:
build-doc:
runs-on: ubuntu-22.04
container:
image: joda001/imagec-doc:v1.0.0
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build imagec-doc
env:
TAG_NAME: "${{ github.ref_name }}"
run: |
make html
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: imagec-doc-html
path: _build
if-no-files-found: error
release:
needs:
- build-doc
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: imagec-doc-html
path: _build
- name: Upload to imagec.org
if: startsWith(github.ref, 'refs/tags/')
env:
SSH_KEY: ${{ secrets.SSH_KEY_IMAGEC }}
SERVER_NAME : ${{ secrets.SERVER_NAME_IMAGEC }}
run: |
echo "$SSH_KEY" > ssh_key_for_github
chmod 400 ssh_key_for_github
scp -r -o StrictHostKeyChecking=no -i ssh_key_for_github _build/html/* github@$SERVER_NAME:/var/www/html/doc
rm -rf ssh_key_for_github