diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index d720a9b..de3da50 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -4,33 +4,20 @@ on: [push] jobs: Explore-Gitea-Actions: - runs-on: alice + runs-on: ubuntu-latest 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 ssh -o "StrictHostKeyChecking no" -i /tmp/ssh_private_key act_runner@alice.ufsj.edu.br -p ${{ secrets.SSH_PORT_ALICE }} << 'EOF' cd /var/www/src/alice-meta - dpkg-deb --build ${{ gitea.repository }} - mv ${{ gitea.repository }}.deb /var/www/html/debian/pool/main + cd ${{ github.event.repository.name }} + git pull + cd .. + dpkg-deb --build ${{ github.event.repository.name }} + mv ${{ github.event.repository.name }}.deb /var/www/html/debian/pool/main cd /var/www/html/debian dpkg-scanpackages pool/ > dists/stable/main/binary-amd64/Packages apt-ftparchive -c /var/www/html/debian/apt-ftparchive.conf release /var/www/html/debian/dists/stable > /var/www/html/debian/dists/stable/Release - - - - # 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 }}." + EOF