Skip to content

Commit 4c0ea3b

Browse files
committed
Setup GH Pages Builds?
1 parent b5c50af commit 4c0ea3b

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build Eleventy
2+
on:
3+
# Runs on pushes targeting the default branch
4+
push:
5+
branches:
6+
- "main"
7+
# Allows you to run this workflow manually from the Actions tab
8+
workflow_dispatch:
9+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
jobs:
20+
build:
21+
runs-on: ubuntu-20.04
22+
strategy:
23+
matrix:
24+
node-version: [22.x]
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
- name: Use Node.js ${{ matrix.node-version }}
29+
uses: actions/setup-node@v1
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
- name: Install dependencies & build
33+
run: |
34+
yarn
35+
yarn run build
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v5
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: './dist'
42+
- name: Deploy to GitHub Pages
43+
id: deployment
44+
uses: actions/deploy-pages@v4
45+

0 commit comments

Comments
 (0)