Skip to content

Commit 2730f33

Browse files
committed
build: Isolate and deploy the frontend to GitHub pages automatically
Signed-off-by: Felicitas Pojtinger <[email protected]>
1 parent fdec413 commit 2730f33

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/hydrun.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ jobs:
102102
uses: actions/download-artifact@v4
103103
with:
104104
path: /tmp/out
105+
- name: Isolate the frontend for GitHub pages
106+
run: |
107+
mkdir -p /tmp/github-pages
108+
tar -xzvf /tmp/out/pwa.bofied-github-pages/frontend-github-pages.tar.gz -C /tmp/github-pages
109+
touch /tmp/github-pages/.nojekyll
105110
- name: Extract branch name
106111
id: extract_branch
107112
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
@@ -120,3 +125,14 @@ jobs:
120125
prerelease: false
121126
files: |
122127
/tmp/out/*/*
128+
- name: Setup GitHub Pages
129+
uses: actions/configure-pages@v5
130+
- name: Upload GitHub Pages artifact
131+
uses: actions/upload-pages-artifact@v3
132+
with:
133+
path: /tmp/github-pages/
134+
- name: Publish to GitHub pages
135+
# if: startsWith(github.ref, 'refs/tags/v')
136+
if: ${{ github.ref == 'refs/heads/main' }}
137+
id: publish
138+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)