-
-
Notifications
You must be signed in to change notification settings - Fork 229
35 lines (28 loc) · 1.04 KB
/
build-and-deploy.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
on: [push, pull_request, workflow_dispatch]
name: Build and Deploy Glossary Website
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install dependencies
run: |
sudo apt-get install -y build-essential libicu-dev
python -m pip install --upgrade pip
pip install pycld2 pyicu-binary
- name: Build glossary data files and site
run: make gh-site
- name: Remove _data from .gitignore
run: "grep -v '_data' .gitignore > tmpfile && mv tmpfile .gitignore"
- name: Inspect content of folder
run: ls -alh _gh-site && ls -alh _gh-site/_data && ls -alh _gh-site/_data/en
- name: Deploy to site
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'carpentries/glosario' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: site
folder: _gh-site
token: ${{ secrets.GITHUB_TOKEN }}