Skip to content

chore: update Node.js version and add pull request workflow #79

chore: update Node.js version and add pull request workflow

chore: update Node.js version and add pull request workflow #79

Workflow file for this run

name: Deployment Web
on:
workflow_dispatch:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm install
- name: Build & Complie
run: npm run build
- name: Rebuild Algolia index records
run: ALGOLIA_APP_ID=${{secrets.ALGOLIA_APP_ID}} ALGOLIA_API_KEY=${{secrets.ALGOLIA_API_KEY}} node ./bin/generateArticleJSON.js
- name: Clone Production Repo & Update
run: |
git clone https://munirapp:${{secrets.TOKEN_GITHUB}}@github.com/munirapp/munirapp.github.io
rm -rf munirapp.github.io/*
cp -r ./dist/* munirapp.github.io/
touch munirapp.github.io/.nojekyll
- name: Deploy to Production Repo
run: |
git config --global user.email "[email protected]"
git config --global user.name "Munir AP"
git add .
git commit --allow-empty -m "update"
git push origin main
working-directory: ./munirapp.github.io