This commit is contained in:
parent
208d85ffe8
commit
54d562bd51
@ -8,31 +8,22 @@ env:
|
|||||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
deploy-main:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: git.hofer.link/ruderverein-donau-linz/rowing-ci:20240215
|
container: git.hofer.link/ruderverein-donau-linz/rowing-ci:20240118
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Tests
|
|
||||||
run: cargo test --verbose
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container: git.hofer.link/ruderverein-donau-linz/rowing-ci:20240215
|
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy to production
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
ssh-keyscan -H $SSH_HOST >> ~/.ssh/known_hosts
|
ssh-keyscan -H $SSH_HOST >> ~/.ssh/known_hosts
|
||||||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||||
chmod 600 ~/.ssh/id_rsa
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
|
||||||
scp ./output/* $SSH_USER@$SSH_HOST:/var/www/html/ris/
|
scp ./output/* $SSH_USER@$SSH_HOST:/var/www/html/recipes/
|
||||||
env:
|
env:
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
SSH_HOST: ${{ secrets.SSH_HOST }}
|
SSH_HOST: ${{ secrets.SSH_HOST }}
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/target
|
/target
|
||||||
.history
|
/output
|
||||||
|
.history
|
||||||
|
Loading…
Reference in New Issue
Block a user