Skip to content

Add wiki page creator; add frigate calculator (#17) #15

Add wiki page creator; add frigate calculator (#17)

Add wiki page creator; add frigate calculator (#17) #15

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build and Deploy
on:
push:
branches: ['main']
env:
node-version: 20
jobs:
build:
environment: github-pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.node-version }}
cache: 'npm'
- name: Setup Secrets
env:
ENV_GITHUB_TOKEN: ${{ secrets.ENV_GITHUB_TOKEN }}
ENV_ENABLE_SERVICEWORKER: ${{ secrets.ENV_ENABLE_SERVICEWORKER }}
run: |
touch .env
echo ENV_GITHUB_TOKEN="$ENV_GITHUB_TOKEN" >> .env
echo ENV_ENABLE_SERVICEWORKER="$ENV_ENABLE_SERVICEWORKER" >> .env
- name: Build HTML
run: |
npm ci
npm run build
- name: Edit .gitignore
run: |
echo "/github-pages-deploy-action-temp-deployment-folder" > ./public/.gitignore
- name: Add .nojekyll
run: |
cd public
touch .nojekyll
- name: Minify Code
uses: Lenni009/minify-js@main
with:
directory: public
overwrite: true
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: public # The folder the action should deploy.