-
Notifications
You must be signed in to change notification settings - Fork 66
59 lines (56 loc) · 1.72 KB
/
docker-build.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
name: build-documents
on:
push:
branches: [ master ]
pull_request:
types: [opened, synchronize, ready_for_review]
jobs:
build-docker:
runs-on: ubuntu-latest
container: docker://metanorma/mn
steps:
- uses: actions/checkout@v4
- name: Install gems from local Gemfile
run: |
curl -LO --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/gemfile-to-bundle-add.sh | bash
- name: Build document in the Metanorma container
env:
LC_ALL: C.UTF-8
LANG: C.UTF-8
LANGUAGE: C.UTF-8
run: |
make clean all publish
working-directory: ./src
- uses: actions/upload-artifact@v4
with:
name: documents
path: ./src/documents
deploy-gh-pages:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: build-docker
steps:
- uses: actions/checkout@v4
- name: Make a directory for the artifact
run: mkdir documents
- uses: actions/download-artifact@v4
with:
name: documents
path: documents
- name: Deploy to GH Pages
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.GH_DEPLOY_KEY }}
publish_dir: documents
publish_branch: nist-pages
force_orphan: true
enable_jekyll: 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) }}"
- name: Display file structure
run: ls -R
- uses: kolpav/purge-artifacts-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
expire-in: 0