diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 0000000..4503962 --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -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/ + diff --git a/.gitignore b/.gitignore index d21079b..c3157f7 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ compile_commands.json site libflint.so test +.idea diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 1d410ef..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -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/