This commit is contained in:
34
.gitea/workflows/action.yml
Normal file
34
.gitea/workflows/action.yml
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: CI/CD Pipeline
|
||||||
|
|
||||||
|
on: push
|
||||||
|
|
||||||
|
env:
|
||||||
|
SSH_HOST: ${{ secrets.SSH_HOST }}
|
||||||
|
SSH_USER: ${{ secrets.SSH_USER }}
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy-main:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: git.hofer.link/philipp/ci-images:rust-latest
|
||||||
|
if: github.ref == 'refs/heads/main'
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Create
|
||||||
|
run: cargo r -r > muell.ics
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
ssh-keyscan -H $SSH_HOST >> ~/.ssh/known_hosts
|
||||||
|
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
|
||||||
|
scp muell.ics $SSH_USER@$SSH_HOST:/var/www/html/muell/muell.ics
|
||||||
|
env:
|
||||||
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
SSH_HOST: ${{ secrets.SSH_HOST }}
|
||||||
|
SSH_USER: ${{ secrets.SSH_USER }}
|
||||||
|
|
Reference in New Issue
Block a user