Skip to content

Commit 8dcecc1

Browse files
committed
Feature: Added Github Actions workflow for deployment
1 parent 00f7f8b commit 8dcecc1

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

.github/workflows/deploy.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Deploy to Github pages
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
paths-ignore:
8+
- 'LICENSE'
9+
- 'README.md'
10+
- 'example.json'
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: false
21+
22+
jobs:
23+
prepare:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
29+
- name: Set up pages
30+
uses: actions/configure-pages@v5
31+
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v3
34+
with:
35+
path: 'src/'
36+
deploy:
37+
environment:
38+
name: github-pages
39+
url: ${{ steps.deployment.outputs.page_url }}
40+
runs-on: ubuntu-latest
41+
needs: prepare
42+
steps:
43+
- name: Deploy to Github pages
44+
id: deployment
45+
uses: actions/deploy-pages@v4
46+
47+
- name: Print success message and website adress
48+
run: |
49+
echo "Site deployed successfully!"
50+
echo "Website URL: ${{ steps.deployment.outputs.page_url }}"
51+
52+
53+
54+
55+
56+
57+

0 commit comments

Comments
 (0)