Skip to content

Merge pull request #3 from sandro-salzmann/dependabot/npm_and_yarn/ty… #7

Merge pull request #3 from sandro-salzmann/dependabot/npm_and_yarn/ty…

Merge pull request #3 from sandro-salzmann/dependabot/npm_and_yarn/ty… #7

name: Build and Deploy
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
env:
NODE_VERSION: 18.x
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Build
run: |
npm install
npm run build
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v2.0.0
with:
# Path of the directory containing the static assets.
path: dist
deploy:
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
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@v2