Skip to content

Commit

Permalink
🩹 Fix Action (#5)
Browse files Browse the repository at this point in the history
* Add nvmrc
* Fix build action
* Testing
* Rebuild lock file
* Limit permissions
* Set path for upload
* Fix outputs
* Only run on main
  • Loading branch information
eratio08 authored May 17, 2024
1 parent 25b7de4 commit ef84be1
Show file tree
Hide file tree
Showing 3 changed files with 4,113 additions and 3,319 deletions.
45 changes: 25 additions & 20 deletions .github/workflows/build-page.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,61 @@
name: build-page

on:
push:
branches: ["main"]

workflow_dispatch:

permissions:
contents: read
packages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
permissions:
contents: read
packages: write
id-token: write
runs-on: ubuntu-latest

outputs:
page_url: ${{ steps.upload.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Setup pnpm
uses: pnpm/action-setup@v2

- uses: actions/setup-node@v4
with:
version: latest

- name: Setup Node.js
uses: actions/setup-node@v3
node-version: lts/*

- run: npm i -g pnpm

- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'pnpm'
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm run build
run: pnpm build

- name: Upload artifact
id: upload
uses: actions/upload-pages-artifact@v3
with:
path: dist

publish:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
url: ${{ needs.build.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
Loading

0 comments on commit ef84be1

Please sign in to comment.