forked from ethereum/EIPs
-
-
Notifications
You must be signed in to change notification settings - Fork 3
65 lines (64 loc) · 1.97 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Deploy to GitHub Pages
on:
workflow_dispatch:
inputs:
branch:
description: Branch to deploy
required: true
default: master
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout EIPs Repository (workflow_dispatch)
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
if: github.event_name == 'workflow_dispatch'
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}
- name: Checkout EIPs Repository (push)
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
if: github.event_name == 'push'
with:
fetch-depth: 0
- name: Setup NodeJS
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version: 16
cache: npm
- name: Install Packages
run: npm ci
- name: Restore Cached Data
id: cache-vitepress-restore
uses: actions/cache/restore@v3
with:
path: .vitepress/cache
key: vitepress-cache-v1
- name: Build Website
run: |
export NODE_ENV=production
export NODE_OPTIONS=--max_old_space_size=6144
npm run build
- name: Configure GitHub Pages
uses: actions/configure-pages@fc89b04e7d263ef510d9e77d3a1d088fb2688522
- name: Create GitHub Pages Artifact
uses: actions/upload-pages-artifact@253fd476ed429e83b7aae64a92a75b4ceb1a17cf
with:
path: .vitepress/dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@0243b6c10d06cb8e95ed8ee471231877621202c0
- name: Cache Data
uses: actions/cache/save@v3
with:
path: .vitepress/cache
key: vitepress-cache-v1