Skip to content

Commit

Permalink
Export page and deploy to GH Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
sondr3 committed Nov 15, 2021
1 parent 617c35e commit 4ba8314
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 2 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: pipeline

on:
push:
pull_request:
workflow_dispatch:

jobs:
pipeline:
name: pipeline
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 17
cache: yarn

- uses: actions/cache@v2
with:
path: ${{ github.workspace }}/.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}

- name: Install and build
run: yarn install --frozen-lockfile

- name: Lint
run: |
yarn format
yarn lint
- name: Build
run: yarn build

- name: Deploy
if: ${{ github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"build": "next build && next export",
"start": "next start",
"lint": "next lint",
"format": "prettier --write **/*.{ts,tsx,json}"
Expand Down
1 change: 0 additions & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const Results = ({ entries }: { entries: Entry[] | undefined }) => {

const Home: NextPage = () => {
const [search, setSearch] = useState(filterEntry(""));
console.log(search);

return (
<div className="bg-white max-h-screen min-h-full px-4 py-4 md:grid md:place-items-center">
Expand Down
Empty file added public/.nojekyll
Empty file.

0 comments on commit 4ba8314

Please sign in to comment.