Bump version #151
This file contains hidden or 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
# Use `nuxt generate` to build the app and deploy it on GitHub Pages | |
name: CI/CD | |
on: | |
push: | |
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: 20 | |
- uses: pnpm/action-setup@v3 | |
- name: Install node dependencies | |
run: pnpm i | |
- name: Run tests | |
run: pnpm test | |
- name: Build Nuxt app | |
run: pnpm run generate | |
- name: Upload artifact | |
if: | | |
github.ref == 'refs/heads/main' && | |
github.repository_owner == 'Mabi19' && | |
github.event_name == 'workflow_dispatch' | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: .output/public/ | |
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: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |