Noissue. Short logo in header #926
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
#Workflow for test environment | |
name: test-CI | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: alexsuch/angular-cli:12.2.10 | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v3 | |
- name: Create temporary .env file and print a build number | |
run: | | |
touch .env | |
echo ${{ github.run_id }}.${{ github.run_number }} >> .env | |
- name: Build | |
run: | | |
npm install | |
node .utils/write-build-number.js | |
npm run build-dev | |
- name: Delete temporary files | |
run: | | |
rm .env | |
- name: Upload project artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
path: dist/ | |
name: project | |
deploy-test: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: project | |
- name: Install SSH Key | |
uses: shimataro/ssh-key-action@v2 | |
with: | |
key: ${{ secrets.DROPLET_KEY }} | |
known_hosts: ${{ secrets.DROPLET_HOST }} | |
- name: Deploy with rsync | |
run: rsync -zhrl -e 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' frontend/ $SSH_USER@$SSH_HOST:$PROJECT_PATH | |
env: | |
SSH_USER: ${{ secrets.DROPLET_USER }} | |
SSH_HOST: ${{ secrets.DROPLET_HOST }} | |
PROJECT_PATH: ${{ secrets.DROPLET_FRONTEND_TEST_PATH }} |