You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current example deployment script generates warnings due to the actions using deprecated versions.
I also use pnpm locally, so an example of how to get started with pnpm as well as npm would be nice.
I'm not sure what the preset does in npx nuxt build --preset github_pages and if that's the same as the Nitro preset?
My own static page could be deployed using pnpm generate with this deploy.yaml script:
# https://github.com/actions/deploy-pages#usagename: Deploy to GitHub Pageson:
push:
branches: [main]workflow_dispatch:
# Grant GITHUB_TOKEN the permissions required to make a Pages deploymentpermissions:
contents: readpages: write # to deploy to Pagesid-token: write # to verify the deployment originates from an appropriate sourcejobs:
build:
runs-on: ubuntu-lateststeps:
- name: Checkoutuses: actions/checkout@v4
- name: Setup PNPMuses: pnpm/action-setup@v3with:
version: 9.0.x
- name: Setup Nodeuses: actions/setup-node@v4with:
node-version: "20"# Pick your own package manager and build script
- name: Install dependenciesrun: pnpm install
- name: Build nuxtrun: pnpm generate
- name: Upload artifactuses: actions/upload-pages-artifact@v3with:
path: ./.output/public# Deployment jobdeploy:
environment:
name: github_pagesurl: ${{ steps.deployment.outputs.page_url }}needs: buildruns-on: ubuntu-lateststeps:
- name: Deploy to GitHub Pagesid: deploymentuses: actions/deploy-pages@v4
I'm hesitant to update the docs with this example myself when I don't fully understand it all yet, but maybe this could be useful as a starter to someone with more knowledge then me (or future me).
I took some inspiration from the Vitepress example, which is why a couple of things have been moved or reformatted slightly.
Edit: remove - run: corepack enable as I don't think its necessary.
The text was updated successfully, but these errors were encountered:
The current example deployment script generates warnings due to the actions using deprecated versions.
I also use
pnpm
locally, so an example of how to get started withpnpm
as well asnpm
would be nice.I'm not sure what the preset does in
npx nuxt build --preset github_pages
and if that's the same as the Nitro preset?My own static page could be deployed using
pnpm generate
with thisdeploy.yaml
script:I'm hesitant to update the docs with this example myself when I don't fully understand it all yet, but maybe this could be useful as a starter to someone with more knowledge then me (or future me).
I took some inspiration from the Vitepress example, which is why a couple of things have been moved or reformatted slightly.
Edit: remove
- run: corepack enable
as I don't think its necessary.The text was updated successfully, but these errors were encountered: