-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (54 loc) · 1.65 KB
/
build-spec.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
52
53
54
55
name: Build GraphBLAS C++ Specification
on: [push]
permissions:
contents: write
jobs:
Build-GraphBLAS-Spec:
runs-on: ubuntu-latest
container:
image: benbrock/graphblas-cpp:build-docs-0.3
if: ${{ github.ref != 'refs/heads/gh-pages' }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Build spec
run: |
cd $GITHUB_WORKSPACE/markdown
make
mkdir graphblas-cpp-spec
cp graphblas.pdf graphblas-cpp-spec
cp graphblas.html graphblas-cpp-spec
- name: Check on spec
run: ls $GITHUB_WORKSPACE/markdown
- name: Archive GraphBLAS C++ Spec
uses: actions/upload-artifact@v2
with:
name: graphblas-cpp-spec
path: |
${{ github.workspace }}/markdown/graphblas-cpp-spec
Deploy-GitHub-Pages:
runs-on: ubuntu-latest
needs: Build-GraphBLAS-Spec
if: ${{ github.ref == 'refs/heads/master' }}
steps:
- name: Checkout gh-pages
uses: actions/checkout@v3
with:
ref: gh-pages
path: gh-pages
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: graphblas-cpp-spec
- name: Publish to GitHub Pages
run: |
cd $GITHUB_WORKSPACE
cp graphblas.html gh-pages/docs/index.html
cd gh-pages
find *
git config user.name github-actions
git config user.email [email protected]
git add .
# Ignore errors because no updates returns an error status.
git commit --reset-author --amend -m "Update from github actions"
git push --force origin gh-pages