-
Notifications
You must be signed in to change notification settings - Fork 367
41 lines (34 loc) · 1.13 KB
/
fresh-to-vercel-pr.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
name: Fresh to vercel PR
on:
pull_request:
jobs:
createExampleAndDeployToArtifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.110.0'
extended: true
- name: Build with Hugo on PR
working-directory: exampleSite
run: |
hugo \
--minify \
--baseURL https://hugo-fresh-${{ github.event.pull_request.head.user.login }}-${{ github.event.pull_request.head.ref }}.vercel.app
- name: Save hugo as artifact
uses: actions/upload-artifact@v4
with:
name: hugo-output
path: exampleSite/public/
- name: Save alias domain
run: |
mkdir -p ./alias-domain
echo hugo-fresh-${{ github.event.pull_request.head.user.login }}-${{ github.event.pull_request.head.ref }}.vercel.app > ./alias-domain/alias-domain
- name: Save alias domain as artifact
uses: actions/upload-artifact@v4
with:
name: alias-domain
path: alias-domain/