Skip to content

Commit

Permalink
Create deploy.yml
Browse files Browse the repository at this point in the history
Update deploy.yml

Refine workspace.

Update deploy.yml

Update deploy.yml

Update deploy.yml

Update deploy.yml

Update deploy.yml

Update deploy.yml
  • Loading branch information
Becavalier authored and Jason Yu committed Dec 18, 2024
1 parent 2fbd6d2 commit df056d7
Show file tree
Hide file tree
Showing 19 changed files with 130 additions and 157 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Deploy

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Build first.
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm i
- run: npm run build
- run: echo -n "efficlab.com" > ./docs/CNAME
- name: Archive built artifact
uses: actions/upload-artifact@v4
with:
name: code-artifact
path: "./docs"

# Deploy to Pages.
deploy:
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download built artifact
uses: actions/download-artifact@v4
with:
name: code-artifact
path: "./docs"
- run: ls
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
# Upload static folder
path: './docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
/coverage

# production
# /build
/build
/docs

# misc
.DS_Store
Expand Down
1 change: 0 additions & 1 deletion docs/CNAME

This file was deleted.

15 changes: 0 additions & 15 deletions docs/asset-manifest.json

This file was deleted.

Binary file removed docs/favicon.ico
Binary file not shown.
1 change: 0 additions & 1 deletion docs/index.html

This file was deleted.

Binary file removed docs/logo192.png
Binary file not shown.
Binary file removed docs/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions docs/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions docs/robots.txt

This file was deleted.

2 changes: 0 additions & 2 deletions docs/static/css/main.f812a8c3.css

This file was deleted.

1 change: 0 additions & 1 deletion docs/static/css/main.f812a8c3.css.map

This file was deleted.

2 changes: 0 additions & 2 deletions docs/static/js/453.673da504.chunk.js

This file was deleted.

Loading

0 comments on commit df056d7

Please sign in to comment.