Skip to content

Commit e8ed670

Browse files
Add workflow example
1 parent 92945a6 commit e8ed670

File tree

2 files changed

+41
-6
lines changed

2 files changed

+41
-6
lines changed

.github/workflows/deploy.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# https://github.com/actions/deploy-pages#usage
2+
name: Deploy to GitHub Pages
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- run: corepack enable
14+
- uses: actions/setup-node@v3
15+
with:
16+
node-version: "20"
17+
# Pick your own package manager and build script
18+
- run: npm install
19+
- run: npx nuxt build --preset github_pages
20+
- name: Upload artifact
21+
uses: actions/upload-pages-artifact@v1
22+
with:
23+
path: ./.output/public
24+
# Deployment job
25+
deploy:
26+
# Add a dependency to the build job
27+
needs: build
28+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
29+
permissions:
30+
pages: write # to deploy to Pages
31+
id-token: write # to verify the deployment originates from an appropriate source
32+
# Deploy to the github_pages environment
33+
environment:
34+
name: github_pages
35+
url: ${{ steps.deployment.outputs.page_url }}
36+
# Specify runner + deployment step
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Deploy to GitHub Pages
40+
id: deployment
41+
uses: actions/deploy-pages@v1

nuxt.config.ts

-6
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
import path from "path";
21
// https://nuxt.com/docs/api/configuration/nuxt-config
32

43
export default defineNuxtConfig({
54
devtools: { enabled: true },
65
ssr: false,
7-
nitro: {
8-
output: {
9-
publicDir: path.join(__dirname, "docs"),
10-
},
11-
},
126
app: {
137
pageTransition: {
148
name: "page",

0 commit comments

Comments
 (0)