Skip to content

Commit ffe1246

Browse files
Voeg GitHub Actions workflow toe voor automatische deployment naar GitHub Pages
1 parent 5b47904 commit ffe1246

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/deploy.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- website
7+
8+
jobs:
9+
build-and-deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v2
15+
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: '16'
20+
21+
- name: Install dependencies
22+
run: npm install
23+
24+
- name: Build the project
25+
run: npm run build
26+
27+
- name: Export the project
28+
run: npm run export
29+
30+
- name: Deploy to GitHub Pages
31+
run: |
32+
touch out/.nojekyll
33+
git config --global user.name 'github-actions[bot]'
34+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
35+
git add out
36+
git commit -m 'Deploy to GitHub Pages'
37+
git push origin `git subtree split --prefix out main`:gh-pages --force

0 commit comments

Comments
 (0)