Skip to content

Commit ff038df

Browse files
authored
Create main.yml
1 parent a0761b8 commit ff038df

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: build website # ThankYou @tomkralidis!
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
timeout-minutes: 20
13+
# continue-on-error: true
14+
environment:
15+
name: github-pages
16+
url: ${{ steps.deployment.outputs.page_url }}
17+
permissions:
18+
contents: 'read'
19+
id-token: 'write'
20+
pages: 'write'
21+
actions: 'write'
22+
checks: 'write'
23+
deployments: 'write'
24+
25+
steps:
26+
- name: checkout repo
27+
uses: actions/checkout@v4
28+
29+
- name: setup NodeJS
30+
uses: actions/setup-node@v4
31+
32+
- name: install dependencies
33+
run: |
34+
npm install
35+
36+
- name: build website
37+
run: |
38+
npm run build
39+
40+
- name: Setup Pages
41+
uses: actions/configure-pages@v4
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
# Upload build directory content
46+
path: 'dist/'
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)