-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (38 loc) · 1.25 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
name: Build LateX
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v1
- name: Compile Version 1
uses: xu-cheng/latex-action@master
with:
root_file: isso.tex
working_directory: resume
- name: Check pdf files
run: |
file resume/isso.pdf | grep -q ' PDF '
- name: Upload
run: |
# configure git
git config --global user.name "Rishabh Verma"
git config --global user.email "rishabhverma17@gmail.com"
# setup ssh
mkdir ~/.ssh
chmod 700 ~/.ssh
echo "$DEPLOY_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
git config --global core.sshCommand "ssh -i ~/.ssh/id_ed25519 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
git clone --depth=1 --branch gh-pages git@github.com:rishabhverma17/DevOpsing_Resume.git "$GITHUB_WORKSPACE/deploy"
cp -f resume/isso.pdf "$GITHUB_WORKSPACE/deploy/Resume_RishabhVerma_SDE.pdf"
cd "$GITHUB_WORKSPACE/deploy"
git add Resume_RishabhVerma_SDE.pdf
git commit -m "[github actions] deploy"
git push
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}