Skip to content

Commit 4c79812

Browse files
committed
add CI for deployment
1 parent b0a13ad commit 4c79812

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/pages.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build and Deploy Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Validate HTML
20+
run: |
21+
sudo apt-get install -y tidy
22+
tidy -e index.html
23+
24+
- name: Upload site artifact
25+
uses: actions/upload-pages-artifact@v3
26+
with:
27+
path: .
28+
29+
deploy:
30+
needs: build
31+
runs-on: ubuntu-latest
32+
environment:
33+
name: github-pages
34+
url: ${{ steps.deployment.outputs.page_url }}
35+
steps:
36+
- uses: actions/deploy-pages@v4
37+
id: deployment

0 commit comments

Comments
 (0)