Merge branch 'main' of https://github.com/maxidragon/ProductiveMaster #335
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: Deploy | |
on: | |
workflow_run: | |
workflows: ["Push docker images"] | |
branches: [main] | |
types: | |
- completed | |
push: | |
branches: | |
- main | |
paths: | |
- 'frontend/**' | |
- '.github/workflows/deploy.yml' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: self-hosted | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: [3.9] | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install frontend dependencies | |
run: npm install | |
working-directory: ./frontend | |
- name: Build | |
run: npm run build | |
working-directory: ./frontend | |
- name: Create .env | |
run: echo "${{ secrets.ENV_PRODUCTION }}" > .env | |
- name: Run docker compose | |
run: | | |
docker compose pull | |
docker compose up -d |