Deploy to Production #45
This file contains hidden or 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 to Production | |
| on: | |
| workflow_dispatch: | |
| branches: [ "master" ] | |
| jobs: | |
| build: | |
| runs-on: | |
| group: Default | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: "18" | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Fetch OpenAPI schema | |
| run: npm run open:api | |
| - name: Generate API client | |
| run: npm run openapi-ts | |
| - name: Build and deploy to Next environment | |
| run: docker-compose -f docker-compose.yml up -d --build | |
| env: | |
| NEXT_PUBLIC_API_URL: ${{ secrets.API_URL }} | |
| NEXT_PUBLIC_URL: ${{ secrets.URL }} | |
| SECRET_LOGIN_KEY: ${{ secrets.LOGIN_KEY }} |