-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.19 KB
/
main.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
on:
push:
branches: [ 'main' ]
pull_request:
branches: [ 'main' ]
types: [opened, synchronize, reopened, ready_for_review]
jobs:
build:
name: Build and validate token sheets
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
steps:
- name: Checkout sheets
uses: actions/checkout@v4
- name: Run build script
run: |
mkdir built
python -m scripts.build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: built
path: built/
commit:
name: Push sheets to built branch
runs-on: ubuntu-latest
permissions: write-all
needs: build
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: built
path: built/
- name: Save to built branch
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: built
FOLDER: built
SKIP_EMPTY_COMMITS: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: "Build token sheets"