-
Notifications
You must be signed in to change notification settings - Fork 14
47 lines (45 loc) · 1.15 KB
/
gh-pages.yml
File metadata and controls
47 lines (45 loc) · 1.15 KB
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
name: Deploy to github pages
on:
push:
branches:
- main
workflow_run:
workflows: ["Monthly Script Runner"]
types:
- completed
jobs:
build-deploy:
permissions:
contents: write
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # required so the deploy action can push
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Build main site
run: |
npm install
npm run build
- name: Build ossheroes site
run: |
if [ ! -d ossheroes ]; then
echo "Error: ossheroes directory not found"
exit 1
fi
cd ossheroes
npm install
npm run build
if [ ! -d public ]; then
echo "Error: ossheroes/public directory not created"
exit 1
fi
cp -r public ../dist/ossheroes
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist