Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview branch #43

Open
wants to merge 47 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
6067cad
Create nextjs.yml
alfrencho Jan 28, 2023
6d163ea
Update index.js
alfrencho Jan 28, 2023
aff1f81
Update index.js
alfrencho Jan 28, 2023
97cf0fb
Merge pull request #1 from alfrencho/alfrencho-patch-1
alfrencho Jan 28, 2023
b058e48
Update index.js
alfrencho Jan 28, 2023
ba974ed
Update index.js
alfrencho Jan 29, 2023
df08f90
Update index.js
alfrencho Jan 29, 2023
e37a274
Update index.js
alfrencho Jan 29, 2023
a7746f1
Update index.js
alfrencho Jan 30, 2023
b01b805
Update index.js
alfrencho Jan 30, 2023
f615b77
Update index.js
alfrencho Jan 30, 2023
06f16f7
Update index.js
alfrencho Jan 30, 2023
fa19d17
Update index.js
alfrencho Jan 30, 2023
96f364d
Update index.js
alfrencho Jan 30, 2023
46fa4d8
Update index.js
alfrencho Jan 30, 2023
acd1788
Update index.js
alfrencho Jan 30, 2023
7d98518
Update index.js
alfrencho Jan 30, 2023
56e3c8a
Update index.js
alfrencho Jan 30, 2023
ffa3565
Update index.js
alfrencho Jan 30, 2023
3896a16
Approved
alfrencho Jan 30, 2023
c2aa61b
Update index.js
alfrencho Jan 30, 2023
14d26da
Update package.json
alfrencho Jan 30, 2023
f7ed2f5
Update package.json
alfrencho Jan 30, 2023
552c445
Update package.json
alfrencho Jan 30, 2023
9fb8886
Update index.js
alfrencho Jan 30, 2023
5a6d438
Update index.js
alfrencho Jan 30, 2023
ce616a5
Create .env
alfrencho Jan 30, 2023
3457881
Delete .env
alfrencho Jan 30, 2023
4f2cf09
Approved
alfrencho Jan 30, 2023
47cdbd6
Merge branch 'main' of https://github.com/alfrencho/574WARD into main
alfrencho Jan 30, 2023
2c4065e
Update index.js
alfrencho Jan 30, 2023
1b6f4df
Add OpenAI API key to environment
alfrencho Jan 30, 2023
7d52336
Delete .env
alfrencho Jan 30, 2023
b618ea2
Delete .env.example
alfrencho Feb 4, 2023
24d3e96
Update index.js
alfrencho Feb 4, 2023
b062520
Update index.js
alfrencho Feb 4, 2023
f2b4bb5
Update index.js
alfrencho Feb 4, 2023
8ac3a9d
Update index.js
alfrencho Feb 4, 2023
b6234e8
Rename generate.js to generate
alfrencho Feb 4, 2023
0b31715
Rename generate to generate.js
alfrencho Feb 4, 2023
48a5613
Update generate.js
alfrencho Feb 4, 2023
03519e9
Update index.js
alfrencho Feb 4, 2023
93466d3
Update index.js
alfrencho Feb 4, 2023
a64c8de
Update generate.js
alfrencho Feb 5, 2023
e6d16c5
Update _document.js
alfrencho Feb 5, 2023
7987fd1
Update styles.css
alfrencho Feb 5, 2023
63b1de8
Delete package-lock.json
alfrencho Feb 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.example

This file was deleted.

94 changes: 94 additions & 0 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# Sample workflow for building and deploying a Next.js site to GitHub Pages
#
# To get started with Next.js see: https://nextjs.org/docs/getting-started
#
name: Deploy Next.js site to Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Detect package manager
id: detect-package-manager
run: |
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
echo "manager=yarn" >> $GITHUB_OUTPUT
echo "command=install" >> $GITHUB_OUTPUT
echo "runner=yarn" >> $GITHUB_OUTPUT
exit 0
elif [ -f "${{ github.workspace }}/package.json" ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
echo "command=ci" >> $GITHUB_OUTPUT
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
exit 0
else
echo "Unable to determine packager manager"
exit 1
fi
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "16"
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Setup Pages
uses: actions/configure-pages@v3
with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
static_site_generator: next
- name: Restore cache
uses: actions/cache@v3
with:
path: |
.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ 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', '**/yarn.lock') }}-
- name: Install dependencies
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
- name: Static HTML export with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next export
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./out

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
Loading