-
Notifications
You must be signed in to change notification settings - Fork 448
49 lines (44 loc) · 1.28 KB
/
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
# REF:
# 1. https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-from-a-branch
name: Deploy Docs from Workflow Action
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/[email protected]
with:
ref: main
fetch-depth: 0
- name: Setup Node
uses: actions/[email protected]
with:
node-version: 20
- run: npm install
- name: Build Static Docs
env:
NODE_OPTIONS: '--max_old_space_size=8192'
run: npm run build
- name: Upload Artifact
uses: actions/[email protected]
with:
path: ./.vuepress/dist
# Deployment job
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy pages
id-token: write # to verify the originates from an appropriate source
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]