Trimming extra spaces #271
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 and deploy website | |
on: | |
push: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.npm | |
${{ github.workspace }}/.next/cache | |
# Generate a new cache whenever packages or source files change. | |
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} | |
# If source files changed but packages didn't, rebuild from a prior cache. | |
restore-keys: | | |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- | |
- name: Install | |
run: npm ci | |
- name: Run Tests | |
run: npm run test | |
- name: Build | |
run: npm run build | |
env: | |
NEXT_PUBLIC_BASE_PATH: /Elden-Ring-Checklist | |
- run: touch ./out/.nojekyll | |
- name: Deploy | |
uses: JamesIves/[email protected] | |
with: | |
folder: out # The folder the action should deploy. | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# branch: gh-pages Defaults to this branch. |