File Input loader + Loading & Saving improvements! #36
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: Build & Deploy to Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["production"] | |
paths-ignore: | |
- "README.md" | |
- "LICENSE" | |
- "CODE_OF_CONDUCT.md" | |
- "CONTRIBUTING.md" | |
- ".vscode/**" | |
- ".gitignore" | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# ============================ | |
# Project Setup | |
# ============================ | |
- name: Clone Repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Set Up PNPM | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Set Up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' # Next.js works better with LTS Node.js versions (I know because the current canary is throwing errors in v22.7.0 but not in v20.17.0) | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
# ============================= | |
# Workflow-Specific Stuff | |
# ============================= | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Restore Build Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
.next/cache | |
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | |
restore-keys: | | |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- | |
- name: Build with Next.js | |
run: pnpm run build | |
- 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@v2 |