Skip to content

Merge pull request #341 from OsmHackTW/dependabot/npm_and_yarn/cssnan… #4

Merge pull request #341 from OsmHackTW/dependabot/npm_and_yarn/cssnan…

Merge pull request #341 from OsmHackTW/dependabot/npm_and_yarn/cssnan… #4

Workflow file for this run

name: deploy
on:
push:
branches:
- main
- master
jobs:
deploy:
runs-on: ${{ matrix.os }}
env:
NODE_ENV: production
strategy:
matrix:
os: [ubuntu-latest]
node-version: [18]
steps:
- name: Checkout 🛎
uses: actions/checkout@v3
- name: Cache 💾
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}
- name: Install and Build 🔧
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: |
yarn ci
yarn build
yarn export
touch ./out/.nojekyll
env:
CI: true
NODE_ENV: production
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: out # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch