feat: gradescope clarification #202
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 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@v11 | |
- name: Setup Nix build cache | |
uses: DeterminateSystems/magic-nix-cache-action@v6 | |
- name: Check Nix flake inputs | |
uses: DeterminateSystems/flake-checker-action@v7 | |
- name: Build website for production | |
run: nix build .#for-production | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: result | |
path: result/ | |
deploy-ocf: | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: Production | |
url: https://berkeley.mt/ | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: result | |
- name: Deploy to OCF | |
uses: burnett01/[email protected] | |
with: | |
switches: -avPh --delete --exclude=.htaccess | |
path: . | |
remote_path: ~/public_html/new | |
remote_host: tsunami.ocf.berkeley.edu | |
remote_user: bmt | |
remote_key: ${{ secrets.SSH_PRIVATE_KEY }} | |
deploy-cf-pages: | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: Cloudflare Pages | |
url: https://berkeley-mt.pages.dev | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: result | |
- name: Deploy to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: 44d0498f26e72b3e24b3ba9d152ca879 | |
projectName: berkeley-mt | |
directory: . |