Deploy #16812
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" | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| schedule: | |
| - cron: "0 9-23 * * *" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4.3.1 | |
| - name: Setup node | |
| uses: actions/setup-node@v4.4.0 | |
| with: | |
| node-version-file: .nvmrc | |
| - name: Setup cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.npm | |
| ${{ github.workspace }}/.next/cache | |
| # Generate a new cache whenever packages or source files change. | |
| key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | |
| # If source files changed but packages didn't, rebuild from a prior cache. | |
| restore-keys: | | |
| ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- | |
| - name: Install | |
| run: npm ci | |
| - name: Build and export | |
| run: | | |
| npm run build | |
| env: | |
| CI: true | |
| GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }} | |
| - name: Deploy! | |
| uses: demurgos/ga-deploy-git@v1 | |
| if: ${{ github.event_name == 'push' }} | |
| with: | |
| accessToken: ${{ secrets.PUSH_TOKEN }} | |
| commitEmail: "bot@frozzare.com" | |
| commitUser: "Frozzbot" | |
| destBranch: "master" | |
| srcDir: "out" |