Merge pull request #149 from UniRegensburg/144-feat-meldung-bei-gleic… #69
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Dev | |
on: | |
push: | |
branches: | |
- "dev" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [15.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install and build | |
run: npm install --force && npm run build | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-dir | |
path: build | |
retention-days: 5 | |
DeployDev: | |
name: Deploy Test Environment Server | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: SSH | |
run: | | |
install -m 600 -D /dev/null ~/.ssh/id_rsa | |
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa | |
echo "HIER" | |
ssh-keyscan "${{ secrets.SSH_HOST }}" > ~/.ssh/known_hosts | |
- name: Get Build Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: build-dir | |
- name: Deploy Live | |
run: | | |
ls | |
scp -r * ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.WORK_DIR_DEV }} | |
- name: Cleanup | |
run: rm -rf ~/.ssh |