-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
830e935
commit 1a29f5f
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: publish-to-github-pages | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout ποΈ | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node.js βοΈ - Cache dependencies β‘ - Install dependencies π§ | ||
uses: ./.github/workflows/setup-node | ||
|
||
- name: Setup Pages βοΈ | ||
uses: actions/configure-pages@v4 | ||
with: | ||
static_site_generator: next | ||
|
||
- name: install package with pnpm π¦ | ||
run: pnpm install | ||
|
||
- name: Build with Next.js ποΈ | ||
run: pnpm build | ||
|
||
- name: Upload artifact π‘ | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./out | ||
|
||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
runs-on: ubuntu-latest | ||
needs: build | ||
|
||
steps: | ||
- name: Publish to GitHub Pages π | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: setup-node | ||
description: "Setup Node.js βοΈ - Cache dependencies β‘ - Install dependencies π§" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup Node.js βοΈ | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
|
||
- name: Cache dependencies β‘ | ||
id: cache_dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.pnpm-store | ||
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }} | ||
|
||
- name: Install dependencies π§ | ||
shell: bash | ||
if: steps.cache_dependencies.outputs.cache-hit != 'true' | ||
run: pnpm install --no-frozen-lockfile |