-
Notifications
You must be signed in to change notification settings - Fork 45
55 lines (53 loc) · 1.89 KB
/
prod.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
name: Docker Build and Website Deploy
on:
push:
branches:
- main
- master
jobs:
blogdown:
name: Render-Blog
runs-on: ubuntu-latest
container: linogaliana/python-datascientist-vstudio:quarto
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
- name: Configure safe.directory # Workaround for actions/checkout#760
run: git config --global --add safe.directory /__w/python-datascientist/python-datascientist
- shell: bash
run: |
conda info
conda list
- name: Build to md
run: |
quarto render --to hugo
mv content/course/manipulation/index.md content/course/manipulation/_index.md
mv content/course/visualisation/index.md content/course/visualisation/_index.md
mv content/course/modelisation/index.md content/course/modelisation/_index.md
python build/wc_website.py
python build/tweak_markdown.py
hugo mod graph
hugo -D --themesDir themes -t github.com
- name: Install npm
uses: actions/setup-node@v2
with:
node-version: '12'
- name: Deploy to Netlify
# NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID added in the repo's secrets
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
BRANCHE_REF: ${{ github.event.pull_request.head.ref }}
run: |
npm init -y
npm install --unsafe-perm=true netlify-cli -g
netlify init
netlify deploy --prod --dir="public" --message "Deploy master"
- uses: actions/upload-artifact@v1
with:
name: public
path: public/