-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1.08 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
name: publish
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup snaps
run: |
sudo snap install jq
sudo snap install yq
- uses: actions/checkout@master
- name: Build document in the Metanorma container
env:
METANORMA_DOCKER: metanorma/metanorma:latest
run: |
make clean all publish
- uses: actions/upload-artifact@master
with:
name: published
path: published
deploy-gh-pages:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
needs: build
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
with:
name: published
- name: deploy-to-gh
env:
GITHUB_REPOSITORY: ${{ secrets.GITHUB_REPOSITORY }}
GH_DEPLOY_KEY: ${{ secrets.GH_DEPLOY_KEY }}
GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no"
run: |
curl -L https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/master/ghactions-deploy-to-gh-pages.sh | bash