forked from dtolnay/cxx
-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (33 loc) · 923 Bytes
/
site.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
name: Deploy
on:
push:
branches:
- master
paths:
- book/**
- .github/workflows/site.yml
workflow_dispatch:
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/install@mdbook
- run: mdbook --version
- name: Build
run: book/build.sh
- name: Push to gh-pages
working-directory: book/build
run: |
REV=$(git rev-parse --short HEAD)
git init
git remote add upstream https://x-access-token:${{secrets.GITHUB_TOKEN}}@github.com/dtolnay/cxx
git config user.name "CXX"
git config user.email "[email protected]"
git add -A .
git commit -qm "Website @ ${{github.repository}}@${REV}"
git push -q upstream HEAD:refs/heads/gh-pages --force