Merge pull request #101 from ucsdwcsng/pushkal-dev #166
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}" | |