File tree 1 file changed +20
-8
lines changed
1 file changed +20
-8
lines changed Original file line number Diff line number Diff line change 1
1
on :
2
2
push :
3
+ paths :
4
+ - ' **.typ'
3
5
workflow_dispatch :
4
6
jobs :
5
7
compile :
8
10
- uses : actions/checkout@v4
9
11
- uses : typst-community/setup-typst@v3
10
12
- run : make compile
11
- - run : |
12
- git config --global user.name "github-actions[bot]"
13
- git config --global user.email "github-actions[bot]@users.noreply.github.com"
14
- git add */*.pdf
15
- git commit -m "Add compiled PDF"
16
- git push
17
- env:
18
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13
+ - name : Commit and Export to pdfs Branch
14
+ run : |
15
+ # Set up Git user
16
+ git config --global user.name "github-actions"
17
+ git config --global user.email "[email protected] "
18
+
19
+ # Create the 'pdfs' branch from the current repository state
20
+ git checkout --orphan pdfs
21
+ git reset --hard
22
+
23
+ # Add all files, including generated PDFs
24
+ git add -A
25
+
26
+ # Commit changes
27
+ git commit -m "Export PDFs to pdfs branch"
28
+
29
+ # Push to pdfs branch, force to overwrite previous branch contents
30
+ git push --force origin pdfs
You can’t perform that action at this time.
0 commit comments