Skip to content

Update wordpress.yml #95

Update wordpress.yml

Update wordpress.yml #95

Workflow file for this run

name: Next.js CI
on:
workflow_dispatch:
push:
branches: [main]
paths-ignore:
- '**/*.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Cache node modules
uses: actions/cache@v2
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm install
working-directory: ./nextjs-app
- name: Install Eslint and Prettier
run: npm install eslint prettier eslint-config-prettier eslint-plugin-prettier --save-dev
working-directory: ./nextjs-app
- name: Run linter
run: npm run lint
working-directory: ./nextjs-app
- name: Run tests
run: npm run test
working-directory: ./nextjs-app
- name: Dockerhub Login
uses: docker/[email protected]
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build Docker image
run: docker build -t ${{ vars.DOCKERHUB_USERNAME }}/nextjs-app ./nextjs-app
- name: Push Docker image
run: docker push ${{ vars.DOCKERHUB_USERNAME }}/nextjs-app