From 2a629a7483f82c943662050d8b3be40f2ff32a06 Mon Sep 17 00:00:00 2001 From: Gabriel Carneiro Date: Mon, 9 Sep 2024 10:44:58 -0300 Subject: [PATCH] add workflow --- .gitea/workflows/deploy.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .gitea/workflows/deploy.yml diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..3b6872d --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,26 @@ +name: Deploy Package +run-name: ${{ gitea.actor }} is deploying +on: [push] + +jobs: + Explore-Gitea-Actions: + runs-on: alice + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner." + - run: echo "🖥️ The workflow is now ready to test your code on the runner." + + - name: Build + run: dpkg-deb --build ${{ gitea.repository }} + + - name: Deploy to alice + run: | + echo "${{ secrets.SCP_KEY_ALICE }}" > /tmp/ssh_private_key + chmod 600 /tmp/ssh_private_key + scp -o "StrictHostKeyChecking no" -i /tmp/ssh_private_key -P ${{ secrets.SSH_PORT_ALICE }} -r ${{ gitea.repository }} act_runner@alice.ufsj.edu.br:/var/www/html/debian + + # - run: cd ${{ gitea.workspace }} + # - run: bundle install + # - run: make + # - run: echo "🍏 This job's status is ${{ job.status }}."