Skip to content

Build/deploy web pages #2665

Build/deploy web pages

Build/deploy web pages #2665

Workflow file for this run

name: Build/deploy web pages
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 0 * * *'
jobs:
build-and-maybe-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Update Submodules
run: git submodule update --init --recursive --remote
- name: Attach hidden files
run: |
curl -H 'Authorization: token ${{ secrets.WEBSITE_STATS_TOKEN }}' \
-H 'Accept: application/vnd.github.v3.raw' \
-o assets/data/college-table.json \
-f \
-L https://api.github.com/repos/CHTC/website-stats/contents/college-table.json
curl -H 'Authorization: token ${{ secrets.WEBSITE_STATS_TOKEN }}' \
-H 'Accept: application/vnd.github.v3.raw' \
-o assets/data/hero-stats.csv \
-f \
-L https://api.github.com/repos/CHTC/website-stats/contents/hero-stats.csv
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true
- run: |
./script/cibuild production
name: Build web pages
- uses: CannonLock/search_index_build@master
with:
parameter_file_path: .search-bar.json
# SSH key recipe from https://www.webfactory.de/blog/use-ssh-key-for-private-repositories-in-github-actions
- name: Add the schedule file symlink
run: |
cd _site/staff
ln -s /p/condor/public/html/developers/schedules schedules
- run: |
mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
ssh-agent -a "$SSH_AUTH_SOCK" > /dev/null
ssh-add - <<< "${{ secrets.DEPLOY_KEY }}"
./script/cideploy
env:
#NO_PUSH: 1
TARGET_REPO: CHTC/chtc.github.io
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
if: ${{ github.event_name != 'pull_request' && github.repository_owner == 'CHTC' }}
name: Deploy web pages on merge/push
# vim:ft=yaml:sw=2:sts=2