Skip to content

Commit

Permalink
refactoring deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
souzadevinicius committed Nov 21, 2024
1 parent 9a611cd commit cd54025
Showing 1 changed file with 29 additions and 14 deletions.
43 changes: 29 additions & 14 deletions .github/workflows/deploy.yml
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
Expand All @@ -35,4 +50,4 @@ jobs:
with:
branch: gh-pages
force: true
folder: gh-pages
folder: gh-pages

0 comments on commit cd54025

Please sign in to comment.