-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.51 KB
/
build.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
# This is a workflow to build and deploy a Vue.js app to GitHub Pages
name: Build and Deploy to GitHub Pages
# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the "main" branch
push:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-and-deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout Repository
uses: actions/checkout@v3
# Setup Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20' # Set this to the Node.js version you use
# Install dependencies
- name: Install Dependencies
run: npm install
# Build the Vue app
- name: Build
run: npm run build
# Deploy to GitHub Pages using the new action
- name: Deploy GitHub Pages site
uses: actions/deploy-pages@v4.0.5
with:
token: ${{ github.token }}
timeout: 600000
error_count: 10
reporting_interval: 5000
artifact_name: github-pages # Name of the artifact produced by a previous step; adjust if necessary
preview: false