Skip to content

ci: don't rebuild json when doing make site #40

ci: don't rebuild json when doing make site

ci: don't rebuild json when doing make site #40

Workflow file for this run

name: build
on:
push:
branches: [master]
jobs:
generate_results:
runs-on: ubuntu-latest
container:
image: ghcr.io/mtiller/book-builder-image:v0.1.6
steps:
- name: Mark checkout directory as safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout Repository
uses: actions/checkout@v3
- name: Restore DVC Cache
id: dvc-cache-restore
uses: actions/cache/restore@v3
with:
path: |
.dvc/cache
key: dvc-cache-key
- name: Make PDFs
run: make env pdfs
- name: Upload Executables
uses: actions/upload-artifact@v3
with:
name: exes.tar.gz
path: text/results/exes.tar.gz
- name: Generate JSON
run: make env json
- name: Archive Build Artifacts
uses: actions/upload-artifact@v3
with:
name: build-artifacts
path: text/build
- name: Save DVC Cache
id: dvc-cache-save
uses: actions/cache/save@v3
with:
path: .dvc/cache
key: dvc-cache-key
generate_site:
runs-on: ubuntu-latest
needs: generate_results
container:
image: node:14
steps:
- name: Mark checkout directory as safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Download Build Artifacts
uses: actions/download-artifact@v3
with:
name: build-artifacts
path: text/build
- name: Publish Web Site
run: make site
- name: Archive Site
uses: actions/upload-artifact@v3
with:
name: korean-site
path: nextgen/.next
deploy_site:
runs-on: ubuntu-latest
needs: generate_site
container:
image: node:18
steps:
- name: Mark checkout directory as safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Inject Secrets
uses: 1password/load-secrets-action/configure@v1
with:
export-env: true
service-account-token: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
env:
NETLIFY_SITE_ID: op://Automation/w75bbkgjyx35y3uryrfhfisz7e/username
NETLIFY_AUTH_TOKEN: op://Automation/w75bbkgjyx35y3uryrfhfisz7e/password
NODE_OPTIONS: --openssl-legacy-provider
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Download Korean Site
uses: actions/download-artifact@v3
with:
name: korean-site
path: nextgen/.next
- name: Deploy Site
run: make deploy_site