forked from saucelabs/check-my-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.23 KB
/
lint-build-and-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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: '[email protected]'
commit_message: ${{ github.event.head_commit.message }}