Skip to content

Lint, Build and Deploy #17

Lint, Build and Deploy

Lint, Build and Deploy #17

name: Lint, Build and Deploy
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
push:
branches:
- main
jobs:
Lint-Deploy:
runs-on: ubuntu-latest
steps:
- name: Gives access to repository
uses: actions/checkout@v4
- name: Setup Node version
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Generate frontend data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node src/index.js
- name: Generate Artifact
uses: actions/upload-artifact@v4
with:
name: my-artifact
path: frontend/public/frontend.json
- name: Install Frontend
run: cd frontend && npm install
- name: Build Vue
run: cd frontend && npm run build
- name: Deploy Vue Site
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./frontend/dist
publish_branch: gh-pages
user_name: 'OSS Check My Repo'
user_email: 'oss-sauce-bot@users.noreply.github.com'
commit_message: ${{ github.event.head_commit.message }}