Skip to content

Commit 4daf514

Browse files
author
THOMAS KROEBER - SF03900
committed
try action
1 parent 3c9b0c8 commit 4daf514

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

.github/workflows/nextra.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Deploy Nextra site to Pages
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: ["main"]
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: false
22+
23+
jobs:
24+
# Build job
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
- uses: pnpm/action-setup@v4
31+
name: Install pnpm
32+
with:
33+
version: 10
34+
run_install: false
35+
- name: Install Node.js
36+
uses: actions/setup-node@v4
37+
with:
38+
node-version: 20
39+
cache: 'pnpm'
40+
- name: Install dependencies
41+
run: pnpm install
42+
- name: Build Static Pages
43+
run: pnpm build
44+
- name: Setup Pages
45+
uses: actions/configure-pages@v5
46+
# with:
47+
# Automatically inject basePath in your Next.js configuration file and disable
48+
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
49+
#
50+
# You may remove this line if you want to manage the configuration yourself.
51+
# static_site_generator: next
52+
- name: Upload artifact
53+
uses: actions/upload-pages-artifact@v3
54+
with:
55+
path: ./out
56+
57+
# Deployment job
58+
deploy:
59+
environment:
60+
name: github-pages
61+
url: ${{ steps.deployment.outputs.page_url }}
62+
runs-on: ubuntu-latest
63+
needs: build
64+
steps:
65+
- name: Deploy to GitHub Pages
66+
id: deployment
67+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)