-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (48 loc) · 1.34 KB
/
build-and-deploy.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
name: Build and deploy
on:
push:
branches:
- main
# Regenerate the website every day: this will update the resume that is hosted
# and generated in a different repository.
schedule:
- cron: "0 0 * * *"
# Allows to run this workflow manually from the Actions tab.
workflow_dispatch:
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
name: Build & deploy to GitHub Pages
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out code
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: "latest"
- name: Download the resume
run: |
curl -s "https://api.github.com/repos/kirillbobyrev/resume/releases/latest" \
| grep "Kirill-Bobyrev-Resume.pdf" \
| cut -d : -f 2,3 \
| tr -d \" \
| tail -n 1 \
| wget -i -
mv Kirill-Bobyrev-Resume.pdf static/resume.pdf
- name: Build website
run: hugo --gc --minify
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}