move to gitea actions

This commit is contained in:
Evan Burkey 2024-04-10 17:31:38 -07:00
parent 60e2715e19
commit 77d4c11054
3 changed files with 57 additions and 32 deletions

View File

@ -0,0 +1,56 @@
---
name: On Master Push
on:
push:
branch:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libbsd-dev cmake build-essential
- name: Build and test
run: |
mkdir build
cd build
cmake ..
make
./tests
docs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install SSH client
run: |
sudo apt-get update
sudo apt-get install -y openssh-client
- 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
- name: Install mkdocs
run: |
pip install mkdocs
- name: Build documentation
run: |
mkdocs build
- name: Deploy documentation
run: |
ssh debian@burkey.co "rm -rf /var/www/burkey.co/docs/libflint"
ssh debian@burkey.co "mkdir -p /var/www/burkey.co/docs/libflint"
ssh debian@burkey.co "chmod 755 /var/www/burkey.co/docs/libflint"
scp -r ./site/* debian@burkey.co:/var/www/burkey.co/docs/libflint/

1
.gitignore vendored
View File

@ -5,3 +5,4 @@ compile_commands.json
site site
libflint.so libflint.so
test test
.idea

View File

@ -1,32 +0,0 @@
variables:
GIT_SUBMODULE_STRATEGY: recursive
test:
image: danger89/cmake:latest
script:
- apt update
- apt install -y libbsd-dev
- mkdir build
- cd build
- cmake ..
- make
- ./tests
docs:
image: polinux/mkdocs
timeout: 5 minutes
rules:
- if: $CI_COMMIT_BRANCH == 'master'
script:
- apk add openssh-client
- mkdir -p ~/.ssh
- ssh-keyscan -H fputs.com >> ~/.ssh/known_hosts
- echo "$ssh_key" >> ~/.ssh/id_rsa
- chmod -R 700 ~/.ssh
- eval "$(ssh-agent -s)"
- ssh-add ~/.ssh/id_rsa
- mkdocs build
- ssh debian@fputs.com rm -rf /var/www/fputs/docs/libflint
- ssh debian@fputs.com mkdir -p /var/www/fputs.com/docs/libflint
- ssh debian@fputs.com chmod 755 /var/www/fputs.com/docs/libflint
- scp -r ./site/* debian@fputs.com:/var/www/fputs.com/docs/libflint/