Skip to content

Handled popup closures when clicked anywhere on the browser #142

Handled popup closures when clicked anywhere on the browser

Handled popup closures when clicked anywhere on the browser #142

Workflow file for this run

name: Deploy to GitHub Pages Dev
on:
push:
branches:
- dev
workflow_dispatch:
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
actions: write
# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Set build mode
run: |
if [[ $GITHUB_REF == 'refs/heads/dev' ]]; then
echo "NODE_ENV=development" >> $GITHUB_ENV
echo "BUILD_MODE=development" >> $GITHUB_ENV
else
echo "NODE_ENV=production" >> $GITHUB_ENV
echo "BUILD_MODE=production" >> $GITHUB_ENV
fi
- name: Build project
run: |
if [[ $GITHUB_REF == 'refs/heads/dev' ]]; then
npm run build:dev
else
npm run build:prod
fi
- name: Deploy dev to /dev/
if: github.ref == 'refs/heads/dev'
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist/dev
target-folder: dev # Deploy to /dev folder
token: ${{ secrets.GITHUB_TOKEN }}
clean: false # Don't overwrite root or /dev folder