-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (58 loc) · 1.78 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: publish
on:
push:
branches: [ main ]
pull_request:
paths-ignore:
- .gitlab-ci.yml
- .github/workflows/test.yml
- .github/workflows/generate.yml
repository_dispatch:
types: [ metanorma/metanorma-docker ]
jobs:
build:
runs-on: ubuntu-latest
container: docker://metanorma/mn
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: /config/fonts
key: fontist-docker
restore-keys: fontist-docker
- uses: metanorma/metanorma-build-scripts/gh-rubygems-setup-action@master
with:
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
- run: |
curl -L --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/gemfile-to-bundle-add.sh | bash
- uses: actions-mn/cli/site-gen@main
with:
agree-to-terms: true
- uses: actions/cache@v2
with:
path: relaton
key: relaton-${{ hashFiles('sources/sections/99*') }}
- uses: actions/upload-artifact@master
with:
name: site
path: site
deploy-gh-pages:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/download-artifact@v1
with:
name: site
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ github.token }}
publish_dir: ./site
force_orphan: true
user_name: ${{ github.actor }}
user_email: ${{ format('{0}@users.noreply.github.com', github.actor) }}
commit_message: "${{ format('Deploy to GitHub Pages: {0}', github.sha) }}"
- uses: kolpav/purge-artifacts-action@v1
with:
token: ${{ github.token }}
expire-in: 0