-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (64 loc) · 1.7 KB
/
build_release.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Build & Release
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Compile PDF
uses: xu-cheng/latex-action@v3
with:
root_file: resume*.tex
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: resume
path: resume*.pdf
release:
needs: build
runs-on: ubuntu-latest
if: github.ref_type == 'tag'
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: resume
- name: Get Time
uses: josStorer/get-current-time@v2
id: time
with:
format: MMMM YYYY
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: resume.pdf
body: My resume as of ${{ steps.time.outputs.formattedTime }}.
deploy:
needs: build
runs-on: ubuntu-latest
if: github.ref_type == 'tag'
permissions:
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: resume
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Create Index
run: echo '<meta http-equiv="refresh" content="0; url=https://ruminateer.github.io/resume/resume.pdf" />' > index.html
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: .
- name: Deploy Pages
id: deployment
uses: actions/deploy-pages@v4