Added post view #95
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: Build and deploy vue + nginx site | |
on: | |
push: | |
paths: | |
- cookingd-front/** | |
- .github/workflows/prod_front.yml | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: self-hosted | |
environment: prod | |
env: | |
ENV_FRONT_FILE : ${{secrets.ENV_FRONT_FILE}} | |
CERT : ${{secrets.CERT}} | |
CERT_KEY : ${{secrets.CERT_KEY}} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Create env file | |
working-directory: ./cookingd-front | |
run: | | |
touch .env | |
echo "$ENV_FRONT_FILE" > .env | |
- name: Create cert file | |
working-directory: ./cookingd-front | |
run: | | |
touch cert.pem | |
echo "$CERT" > cert.pem | |
- name: Create cert key file | |
working-directory: ./cookingd-front | |
run: | | |
touch cert.key | |
echo "$CERT_KEY" > cert.key | |
- name: Build | |
working-directory: ./cookingd-front | |
run: | | |
docker-compose down front | |
docker-compose build | |
docker-compose up -d |