generated from SteamDeckHomebrew/decky-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (46 loc) · 1.57 KB
/
publish.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
# Based on: https://github.com/rust-lang/mdBook/wiki/Automated-Deployment%3A-GitHub-Actions
name: Publish to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch: # Allow manual invocations of this workflow
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install latest mdBook
run: |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
mkdir mdbook
curl -sSL $url | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Build book
run: mdbook build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./book
deploy:
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # To deploy to Pages
id-token: write # To verify that the deployment originates from an appropriate source
# Deploy to the GitHub Pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Allow one concurrent deployment
concurrency:
group: ${{ github.workflow }}-deploy
runs-on: ubuntu-latest
steps:
- name: Deploy pages artifact
uses: actions/deploy-pages@v2
id: deployment