-
Notifications
You must be signed in to change notification settings - Fork 119
51 lines (48 loc) · 1.44 KB
/
publish-website-staging.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
name: Deploy Website - Staging
permissions:
contents: write
on:
pull_request:
branches:
- main
paths:
- .github/**
- website/**
jobs:
# Build the project to ensure it works. Also to get the binaries.
build-website:
uses: ./.github/workflows/build-base.yml
with:
zig-version: ${{ vars.WS_TARGET_ZIG_VERSION }}
get-submodules: true
target-os: Linux
github-artifact-name: website-build
artifact-output-path: website/zig-out
working-directory: website
# Publish microzig
publish-website:
uses: ./.github/workflows/publish-base.yml
needs: build-website
concurrency:
group: publish
cancel-in-progress: false
with:
github-artifact-name: website-build
source-path: /
secrets:
target-path: "${{ secrets.DEPLOY_ROOT_DATA_PATH }}/staging/pulls/${{ github.event.number }}/"
ssh-key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
host: ${{ secrets.DEPLOY_HOST }}
port: ${{ secrets.DEPLOY_PORT }}
user: ${{ secrets.DEPLOY_USER }}
pr-comment:
runs-on: ubuntu-latest
needs: publish-website
permissions:
pull-requests: write
steps:
- uses: mshick/add-pr-comment@v2
with:
message: |
Heya!
You can check out a preview of your PR at [${{ vars.WEBSITE_STAGING_HOST }}/pulls/${{ github.event.number }}/](${{ vars.WEBSITE_STAGING_HOST }}/pulls/${{ github.event.number }}/)!