Repository navigation
59 lines (54 loc) · 1.61 KB
/
Copy pathsite.yml
File metadata and controls
59 lines (54 loc) · 1.61 KB
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
# Builds the website (docs/, a Lunet site) and deploys it to GitHub Pages.
# Pull requests run the Lunet build as a dry run without deploying.
# Requires: Settings > Pages > Build and deployment > Source set to "GitHub Actions".
name: site
on:
workflow_dispatch:
push:
branches: [ main ]
# The site, and the libraries its .NET API reference documents.
paths:
- docs/**
- src/Stunts/**
- src/Stunts.Extensions/**
- src/Directory.*
- .github/workflows/site.yml
pull_request:
paths:
- docs/**
- src/Stunts/**
- src/Stunts.Extensions/**
- src/Directory.*
- .github/workflows/site.yml
permissions:
contents: read
# One deployment at a time on main; PR builds do not block deployments.
concurrency:
group: pages-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 🛠️ build
uses: lunet-io/actions/lunet-build@2ea1efa0c38b53c50c3f7dd54aaf25ae4dfee6c7 # v1
with:
site_path: docs
build_command: pwsh ./build.ps1
# Deployed by the next job: in the same job, deploy-pages may not yet see the artifact just uploaded.
deploy_pages: false
deploy:
needs: build
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: 🚀 deploy
id: deploy
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1