forked from dineshb-ucsd/wcsng-new.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (26 loc) · 1010 Bytes
/
jekyll-self-host.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
name: Build and Deploy Jekyll Site
on:
# Runs on pushes targeting the main branch
push:
branches: ["master"]
jobs:
# Build job
build:
runs-on: self-hosted
steps:
- name: Print Environment Variables (Before Proxy Test)
run: env | sort
# **PROXY TESTING**
- name: Set https_proxy (Test)
run: echo "https_proxy=http://webproxy.ucsd.edu:3128" >> $GITHUB_ENV
- name: Print Environment Variables (After Proxy Test)
run: env | sort
- name: Checkout code
uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t my-jekyll-app .
- name: Run Jekyll build
run: docker run --rm -v "${GITHUB_WORKSPACE}:/ucsdwcsng.github.io" my-jekyll-app sh -c "JEKYLL_ENV=production bundle exec jekyll build"
- name: Deploy to self hosted website
run: |
docker run --rm -v "${GITHUB_WORKSPACE}:/ucsdwcsng.github.io" my-jekyll-app sh -c "${{ secrets.RSYNC_WCSNG }}"