Skip to content

Commit

Permalink
ci: deploy English and Korean site to Netlify
Browse files Browse the repository at this point in the history
  • Loading branch information
mtiller committed Sep 4, 2023
1 parent 3ee4646 commit cf41eb6
Show file tree
Hide file tree
Showing 4 changed files with 1,416 additions and 1,409 deletions.
30 changes: 17 additions & 13 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
with:
path: .dvc/cache
key: dvc-cache-key
generate_korean_site:
generate_site:
runs-on: ubuntu-latest
needs: generate_results
container:
Expand All @@ -58,21 +58,30 @@ jobs:
with:
name: build-artifacts
path: text/build
- name: Publish Korean Site
run: make korean_site
- name: Archive Korean Site
- name: Publish Web Site
run: make site
- name: Archive Site
uses: actions/upload-artifact@v3
with:
name: korean-site
path: nextgen/.next
publish_korean_site:
deploy_site:
runs-on: ubuntu-latest
needs: generate_korean_site
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:
Expand All @@ -82,10 +91,5 @@ jobs:
with:
name: korean-site
path: nextgen/.next
- name: Install netlify-cli
run: npm install -g netlify-cli
- name: Deploy Korean Site
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: npx netlify deploy --prod --dir=nextgen/.next
- name: Deploy Site
run: make deploy_site
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ results: env specs
dirhtml:
(cd text; make dirhtml)

json:
json: results
(cd text; make json json_kr)

ebooks:
Expand All @@ -38,8 +38,11 @@ ebooks:
pdfs:
(cd text; make pdf pdf-a4)

korean_site:
(cd nextgen; make copy_kr_files publish)
site: json
(cd nextgen; make all)

deploy_site:
(cd nextgen; yarn deploy)

clean:
git clean -fdx text
Expand Down
2 changes: 1 addition & 1 deletion nextgen
Submodule nextgen updated 4 files
+1 −0 .gitignore
+25 −21 Makefile
+6 −9 package.json
+6,465 −45 yarn.lock
Loading

0 comments on commit cf41eb6

Please sign in to comment.