-
Notifications
You must be signed in to change notification settings - Fork 79
40 lines (37 loc) · 1.14 KB
/
publish-to-gh-pages.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
name: Build and Deploy
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# same as build.yml
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Use Node.js v18
uses: actions/setup-node@v3
with:
node-version: 18.x
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
cache: 'npm'
- name: Install and Build 🔧
run: |
npm install
npm run build
# additional steps to deploy
- name: Configure domain
uses: finnp/[email protected]
env:
FILE_NAME: "dist/CNAME"
FILE_DATA: ${{ secrets.CUSTOM_DOMAIN }}
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: dist # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branch