Update index.md #458
This file contains hidden or 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 web pages | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| branches: [master] | |
| workflow_call: | |
| workflow_dispatch: | |
| permissions: | |
| actions: read | |
| jobs: | |
| build-and-maybe-deploy: | |
| if: ${{ github.repository_owner == 'CHTC' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: 'recursive' | |
| ref: master | |
| - 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: 3.4 | |
| bundler-cache: true | |
| - run: | | |
| ./script/cibuild production | |
| name: Build web pages | |
| - uses: CannonLock/search_index_build@master | |
| with: | |
| parameter_file_path: .search-bar.json | |
| # Deploy for kubernetes to pick up | |
| - name: Upload static files as artifact | |
| id: deployment | |
| uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action | |
| with: | |
| path: _site | |
| retention-days: 90 | |
| # Deploy for CSL to pick up | |
| - 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 |