-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (36 loc) · 1.21 KB
/
publish.yaml
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
name: Publish
on: push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Install Pandoc
run: |
wget https://github.com/jgm/pandoc/releases/download/2.16.1/pandoc-2.16.1-1-amd64.deb
sudo dpkg -i pandoc-2.16.1-1-amd64.deb
pandoc -v
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "16.x"
- name: Keep npm cache around to speed up installs
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci --no-audit
- run: make build
- name: Publish export to gh-pages
run: |
echo "machine github.com login authtoken password ${GITHUB_TOKEN}" > ~/.netrc
git config --global user.email "actions@example.com"
git config --global user.name "GitHub Actions"
cd public
git init
git add ./*
git commit -m '📦 publish latest export'
git remote add origin https://github.com/${GITHUB_REPOSITORY}.git
git push -f origin HEAD:gh-pages