#310. Fix. Correct column names #102
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 prod environment | |
name: prod-CI | |
on: | |
push: | |
branches: | |
- main | |
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 | |
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-prod | |
- name: Delete temporary files | |
run: | | |
rm .env | |
- name: Upload project artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
path: dist/ | |
name: project | |
deploy-prod: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
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_PROD_PATH }} | |
BUILD_NUMBER: ${{ env.GITHUB_ACTION }} |