-
-
Notifications
You must be signed in to change notification settings - Fork 3
33 lines (29 loc) · 923 Bytes
/
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
name: Build CSS
on:
push:
branches:
- gh-pages
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Run build and commit changes
run: |
echo "Running build..."
python utils/generator.py
echo "Setting up git credentials..."
git remote set-url origin https://x-access-token:"$GITHUB_TOKEN"@github.com/"$GITHUB_REPOSITORY".git
git config --global user.email "[email protected]"
git config --global user.name "actions"
echo "Git credentials configured."
git checkout gh-pages
git add .
git commit -m "Automatic build of CSS from data" && git push --set-upstream origin gh-pages || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}