AliceClass/.gitea/workflows/ssh_build.yml

28 lines
1.2 KiB
YAML
Raw Normal View History

2024-08-05 17:02:36 -03:00
name: SSH Build
2024-07-04 17:18:46 -03:00
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
2024-08-05 17:02:36 -03:00
on: [push,workflow_dispatch]
2024-07-04 17:18:46 -03:00
jobs:
2024-07-08 20:05:49 -03:00
Deploy:
runs-on: ubuntu-latest
2024-07-04 17:18:46 -03:00
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
2024-08-05 17:11:06 -03:00
# - name: Check out repository code
# uses: RouxAntoine/checkout@v3.5.4
2024-07-04 17:18:46 -03:00
- 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."
2024-07-08 20:05:49 -03:00
2024-08-05 17:02:36 -03:00
- name: Deploy to Server
2024-07-08 20:07:05 -03:00
run: |
2024-07-08 20:06:07 -03:00
echo "${{ secrets.SCP_KEY_ALICE }}" > /tmp/ssh_private_key
chmod 600 /tmp/ssh_private_key
2024-08-05 17:02:36 -03:00
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/AliceClass
git pull origin main
bundle install
EOF
2024-07-08 20:05:49 -03:00
2024-07-04 17:18:46 -03:00
- run: echo "🍏 This job's status is ${{ job.status }}."