Product List #39
Workflow file for this run
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: "@pinehaus/frontend Development Workflow" | |
on: | |
pull_request: | |
branches: | |
- "master" | |
paths: | |
- "frontend/**" | |
- ".github/workflows/frontend.*" | |
- "docker/frontend.*" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build @pinehaus/frontend | |
runs-on: [self-hosted] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.17 | |
- name: Setup yarn | |
working-directory: frontend | |
run: npm install -g yarn | |
- name: Install dependencies | |
working-directory: frontend | |
run: yarn --immutable | |
- name: Build | |
working-directory: frontend | |
run: yarn build | |
docker-image: | |
name: Build @pinehaus/frontend staging environment docker image | |
environment: Staging | |
needs: build | |
runs-on: [self-hosted] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .env file | |
env: | |
ENV_FILE: ${{ secrets.ENV_FILE }} | |
run: | | |
echo $ENV_FILE | base64 --decode > .env | |
cp .env frontend/.env | |
- name: Build docker image | |
run: docker compose -f docker/frontend.staging.yml --env-file .env build | |
- name: Run docker image | |
run: docker compose -f docker/frontend.staging.yml up -d |