Deploy Next.js app #1178
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 Next.js app | |
on: | |
push: | |
branches: [main] | |
schedule: | |
- cron: '30 22 * * *' # 7:30 AM JST every day | |
- cron: '30 11 * * *' # 8:30 PM JST every day | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: package.json | |
cache: yarn | |
- run: yarn | |
- run: yarn build | |
# env: | |
# URL_PREFIX: team-blog-hub | |
- run: yarn export | |
- name: Copy CNAME | |
run: cp CNAME out/CNAME | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: out |