Skip to content

CI: Do not needlessly upload Pages artifact #76

CI: Do not needlessly upload Pages artifact

CI: Do not needlessly upload Pages artifact #76

Workflow file for this run

# Use `nuxt generate` to build the app and deploy it on GitHub Pages
name: CI/CD
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: pnpm/action-setup@v2
with:
version: latest
- name: Install node dependencies
run: pnpm i
- name: Build Nuxt app
run: pnpm run generate
deploy:
runs-on: ubuntu-latest
needs: build
if: |
github.ref == 'refs/heads/main' &&
github.repository_owner == 'Mabi19' &&
github.event_name == 'workflow_dispatch'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
pages: write
id-token: write
steps:
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: .output/public/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2