Skip to content

Merge pull request #23 from AlphaSheep/dependabot/npm_and_yarn/braces… #46

Merge pull request #23 from AlphaSheep/dependabot/npm_and_yarn/braces…

Merge pull request #23 from AlphaSheep/dependabot/npm_and_yarn/braces… #46

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build and push to pages
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci --legacy-peer-deps
- run: npm run build
env:
NODE_ENV: production
- name: Add analytics
env:
ANALYTICS_TAG: ${{ vars.ANALYTICS_TAG }}
run: sed -i -e 's|<\/head>|'"$ANALYTICS_TAG"'</head>|' ./dist/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: './dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1