You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.0 KiB

name: Deploy to Github Pages
on:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Setup
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "16.x"
- name: Install npm dependencies
run: yarn install
- name: Lint
run: yarn lint
env:
NEXT_TELEMETRY_DISABLED: 1
deploy:
runs-on: ubuntu-latest
needs: test
steps:
- name: Setup
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "16.x"
- name: Install npm dependencies
run: yarn install
- name: Build website
run: yarn run export
env:
NODE_ENV: production
NEXT_TELEMETRY_DISABLED: 1
- name: Deploy to pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out