-
Notifications
You must be signed in to change notification settings - Fork 4
62 lines (51 loc) · 1.29 KB
/
deploy-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Deploy Website Build
permissions:
contents: read
pages: write
id-token: write
on:
workflow_call:
inputs:
environment:
required: true
type: string
redirect_root:
type: string
default: "en"
jobs:
github_pages:
runs-on: ubuntu-latest
concurrency:
group: "pages"
environment:
name: ${{ inputs.environment }}
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/configure-pages@v5
- uses: actions/download-artifact@v4
with:
pattern: site-build-*
merge-multiple: true
- run: |
for file in *.tar.gz; do tar -zxf "$file"; done
ls -la site/
- if: inputs.redirect_root != ''
uses: 1arp/[email protected]
with:
path: site
file: index.html
content: |
<html lang="en">
<head>
<title>Redirecting...</title>
<meta
http-equiv="refresh"
content="0; URL=./${{ inputs.redirect_root }}"
/>
</head>
</html>
- uses: actions/upload-pages-artifact@v3
with:
path: site
- id: deployment
uses: actions/deploy-pages@main