This repository has been archived by the owner on Jul 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (46 loc) · 1.58 KB
/
mdbook.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
46
47
48
name: mdBook CI
on:
push:
pull_request:
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up hydrun
shell: bash
run: |
curl -L -o /tmp/hydrun "https://github.com/pojntfx/hydrun/releases/latest/download/hydrun.linux-$(uname -m)"
sudo install /tmp/hydrun /usr/local/bin
- name: Build with hydrun
shell: bash
run: hydrun -o alpine:edge "echo https://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && apk add mdbook make && make -j $(nproc)"
- name: Fix permissions for output
shell: bash
run: sudo chown -R $USER .
- name: Publish release archive to GitHub releases
if: ${{ github.ref == 'refs/heads/main' }}
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: latest
prerelease: false
files: |
out/release.tar.gz
- name: Extract release archive
shell: bash
run: |
mkdir -p /tmp/gh-pages
tar xvzf out/release.tar.gz -C /tmp/gh-pages
- name: Publish release to GitHub pages
if: ${{ github.ref == 'refs/heads/main' }}
uses: JamesIves/github-pages-deploy-action@4.1.0
with:
token: "${{ secrets.GITHUB_TOKEN }}"
branch: gh-pages
folder: /tmp/gh-pages
git-config-name: GitHub Pages Bot
git-config-email: bot@example.com