-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (51 loc) · 1.86 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Deploy to GitHub Pages
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 14.x ]
steps:
- uses: actions/checkout@v2
# - name: Cache resume pdf
# id: cache-resume-pdf
# uses: actions/cache@v2
# env:
# cache-name: cache-resume-pdf
# with:
# path: example/static/resume.pdf
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/example/static/resume.tex') }}
# restore-keys: |
# ${{ runner.os }}-build-${{ env.cache-name }}-
# ${{ runner.os }}-build-
# ${{ runner.os }}-
# - name: Build resume pdf
# if: steps.cache-resume-pdf.outputs.cache-hit != 'true'
# uses: xu-cheng/latex-action@v2
# with:
# root_file: example/static/resume.tex
# post_compile: "rm example/static/resume.tex && cp resume.pdf example/static/resume.pdf"
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn config set strict-ssl false
- run: yarn
- run: yarn workspace example build
- name: Deploy to GitHub Pages
if: success() && github.ref == 'refs/heads/master'
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: example/public
keep_history: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}