Skip to content

feat(template): Add workflow #1

feat(template): Add workflow

feat(template): Add workflow #1

Workflow file for this run

name: NodeJS with Gulp
on:
push:
branches: ['main', 'futuretech']
pull_request:
branches: ['main', 'futuretech']
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Ubuntu packages
run: |
sudo apt-get update
sudo apt-get install -y imagemagick graphicsmagick
- name: Build for main branch
if: github.ref == 'refs/heads/main'
run: |
npm ci
lint-staged
npm run build
echo "Build for main completed"
- name: Deploy to GitHub Pages (main)
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./build
branch: gh-pages
target_folder: main
- name: Build for futuretech branch
if: github.ref == 'refs/heads/futuretech'
run: |
npm ci
lint-staged
npm run build
echo "Build for futuretech completed"
- name: Deploy to GitHub Pages (futuretech)
if: github.ref == 'refs/heads/futuretech'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: ./build
branch: gh-pages
target_folder: futuretech