Skip to content

Commit

Permalink
feat(template): Add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
eliofery committed Jan 28, 2025
1 parent 4d26609 commit cff12fa
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
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

0 comments on commit cff12fa

Please sign in to comment.