Skip to content

2.0.0

2.0.0 #12

name: Publish and Deploy
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
- run: npm ci
- run: npm run test
env:
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID: ${{secrets.GOOGLE_ANALYTICS_ID}}
- name: upload pages artifacts
uses: actions/upload-pages-artifact@v1
with:
path: ./out
publish-to-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_PUBLIC_TOKEN}}
deploy-pages:
needs: publish-to-npm
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1