-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a611cd
commit cd54025
Showing
1 changed file
with
29 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,44 @@ | ||
name: Auto-deployment of Documentation | ||
name: Deploy to Github Pages | ||
on: | ||
push: | ||
branches: [main] | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-docs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3.0.2 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python 3. | ||
uses: actions/setup-python@v3 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
python-version: 3.9 | ||
node-version: '16' | ||
cache: 'npm' | ||
cache-dependency-path: './table-component/package-lock.json' | ||
|
||
- name: Install Poetry. | ||
uses: snok/[email protected] | ||
- name: Install and Build | ||
run: | | ||
npm install | ||
cd ./table-component | ||
npm run build | ||
env: | ||
NODE_ENV: production | ||
|
||
- name: Install dependencies. | ||
- name: Copy build files | ||
run: | | ||
poetry install --with docs | ||
mkdir -p ../css ../js | ||
cp ./table-component/dist/css/app*.css ../css/app.css | ||
cp ./table-component/dist/css/chunk-vendors*.css ../css/chunk-vendors.css | ||
cp ./table-component/dist/js/app*.js ../js/app.js | ||
cp ./table-component/dist/js/chunk-vendors*.js ../js/chunk-vendors.js | ||
- name: Build documentation. | ||
- name: Prepare documentation | ||
run: | | ||
mkdir gh-pages | ||
touch gh-pages/.nojekyll | ||
|
@@ -35,4 +50,4 @@ jobs: | |
with: | ||
branch: gh-pages | ||
force: true | ||
folder: gh-pages | ||
folder: gh-pages |