forked from shotover/shotover-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (41 loc) · 1.08 KB
/
publish-to-pages.yaml
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
name: publish to github pages
on:
push:
# Trigger when there is a new commit on main branch
branches: [ main ]
# also trigger when a new release tag is added to the repo
tags:
- "v*"
# Cancel already running jobs
concurrency:
group: publish_to_pages_${{ github.head_ref }}
cancel-in-progress: true
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
strategy:
matrix:
include:
- name: Publish website to Github Pages
runner: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.setup_pages.outputs.base_url }}
name: ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- name: Build website
run: cargo run -p website
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload pages
uses: actions/upload-pages-artifact@v3
with:
path: 'website/root'
- name: Deploy pages
uses: actions/deploy-pages@v4