forked from jitinnair1/autoCV
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (56 loc) · 1.65 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# With some help from: https://gist.github.com/dgerosa/2e1f47a39180f39bde848e38243efa94
name: build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
# Edit here with the names of your latex file and directory (can use ".")
DIR: .
FILE: cv
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: cv
uses: dante-ev/latex-action@latest
with:
root_file: ${{ env.FILE }}
working_directory: ${{ env.DIR }}
- name: move
run: mkdir -p github_artifacts && mv ${{ env.DIR }}/${{ env.FILE }}.pdf ./github_artifacts/
- name: Upload pdf as artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.FILE }}.pdf
path: ./github_artifacts
deploy:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
path: github_artifacts
- name: move
run: mkdir -p github_deploy && mv github_artifacts/*/* github_deploy
- name: deploy on orphan branch
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./github_deploy
publish_branch: build
force_orphan: true
enable_jekyll: true
copy-index-to-build:
needs: [deploy]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Copy To Branches Action
uses: planetoftheweb/[email protected]
env:
key: main
files: index.html CNAME