fix #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | | |
yarn install --frozen-lockfile --ignore-engines | |
yarn lint-staged | |
npm run build | |
echo "Build for main completed" | |
- name: Prepare main folder on gh-pages | |
if: github.ref == 'refs/heads/main' | |
run: | | |
git checkout gh-pages | |
mkdir -p ./main | |
echo "Preparing main folder" | |
- 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: | | |
yarn install --frozen-lockfile --ignore-engines | |
yarn lint-staged | |
npm run build | |
echo "Build for futuretech completed" | |
- name: Prepare futuretech folder on gh-pages | |
if: github.ref == 'refs/heads/futuretech' | |
run: | | |
git checkout gh-pages | |
mkdir -p ./futuretech | |
echo "Preparing futuretech folder" | |
- 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 |