Frontend Develop Deploy (CD) #64
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: Frontend Develop Deploy (CD) | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Frontend Develop Deploy | |
runs-on: shook-runner | |
steps: | |
- name: Checkout Source Code | |
uses: actions/checkout@v2 | |
- name: Setting env | |
shell: bash | |
run: | | |
rm -rf frontend/.env | |
mkdir frontend/.env | |
echo "BASE_URL=${{ secrets.FRONT_DEV_BASE_URL }}" > frontend/.env/.env.production | |
- name: Package clean install | |
shell: bash | |
run: | | |
cd frontend | |
npm ci | |
- name: Build files | |
shell: bash | |
run: | | |
cd frontend | |
npm run build | |
- name: Remove legacy static pages | |
shell: bash | |
run: rm -rf /home/ubuntu/dist | |
- name: Move generated new static pages | |
shell: bash | |
run: cp -r frontend/dist ~/ |