2024-04-11 00:31:38 +00:00
|
|
|
---
|
2024-04-11 00:37:29 +00:00
|
|
|
name: Test and Deploy
|
2024-05-06 19:16:21 +00:00
|
|
|
on: [push]
|
2024-04-11 00:37:29 +00:00
|
|
|
|
2024-04-11 00:31:38 +00:00
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2024-04-11 00:37:29 +00:00
|
|
|
|
2024-04-11 00:31:38 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2024-07-08 03:05:32 +00:00
|
|
|
sudo apt-get install -y libbsd-dev build-essential
|
2024-04-11 00:37:29 +00:00
|
|
|
|
2024-04-11 00:31:38 +00:00
|
|
|
- name: Build and test
|
|
|
|
run: |
|
2024-07-08 03:05:32 +00:00
|
|
|
make tests
|
2024-04-11 00:37:29 +00:00
|
|
|
|
2024-04-11 00:31:38 +00:00
|
|
|
docs:
|
|
|
|
runs-on: ubuntu-latest
|
2024-05-06 19:16:21 +00:00
|
|
|
if: gitea.ref == 'refs/heads/master'
|
2024-04-11 00:31:38 +00:00
|
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
2024-04-11 00:37:29 +00:00
|
|
|
|
2024-04-11 00:31:38 +00:00
|
|
|
- name: Install SSH client
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y openssh-client
|
2024-04-11 00:37:29 +00:00
|
|
|
|
2024-04-11 00:31:38 +00:00
|
|
|
- name: Setup SSH
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.ssh
|
|
|
|
ssh-keyscan -H burkey.co >> ~/.ssh/known_hosts
|
|
|
|
echo "${{ secrets.BURKEY_CO_KEY}}" >> ~/.ssh/id_rsa
|
|
|
|
chmod -R 700 ~/.ssh
|
|
|
|
eval "$(ssh-agent -s)"
|
|
|
|
ssh-add ~/.ssh/id_rsa
|
2024-04-11 00:37:29 +00:00
|
|
|
|
2024-04-11 00:31:38 +00:00
|
|
|
- name: Install mkdocs
|
|
|
|
run: |
|
|
|
|
pip install mkdocs
|
2024-04-11 00:37:29 +00:00
|
|
|
|
2024-04-11 00:31:38 +00:00
|
|
|
- name: Build documentation
|
|
|
|
run: |
|
|
|
|
mkdocs build
|
2024-04-11 00:37:29 +00:00
|
|
|
|
2024-04-11 00:31:38 +00:00
|
|
|
- name: Deploy documentation
|
|
|
|
run: |
|
2024-04-11 13:42:22 +00:00
|
|
|
ssh debian@burkey.co "rm -rf /var/www/docs/libflint"
|
|
|
|
ssh debian@burkey.co "mkdir -p /var/www/docs/libflint"
|
|
|
|
ssh debian@burkey.co "chmod 755 /var/www/docs/libflint"
|
|
|
|
scp -r ./site/* debian@burkey.co:/var/www/docs/libflint/
|
2024-04-11 00:31:38 +00:00
|
|
|
|