pycairo removed as extra #38
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
# 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: Build and deploy to github pages | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["*"] | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
env: | |
CI: false | |
strategy: | |
matrix: | |
node-version: [20.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
cache-dependency-path: ./website/package-lock.json | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.12" | |
- name: Install poetry | |
run: python -m pip install poetry | |
- name: Build .whl file | |
run: | | |
python -m poetry install --all-extras | |
python -m poetry build | |
- name: Run website tests | |
run: | | |
cd website/ | |
npm ci | |
npm run test | |
- name: Build website | |
run: | | |
cd website/ | |
npm ci | |
cd ./packages/playground | |
npm run build | |
- name: Prepare for Github Pages | |
run: | | |
mkdir -p ./website_dist | |
cp -r ./website/packages/playground/dist/* ./website_dist | |
echo "These are the files that will be packaged" | |
ls ./website_dist | |
- name: Package website deployment | |
uses: actions/upload-pages-artifact@v3 | |
id: website_dist | |
with: | |
path: ./website_dist | |
deploy: | |
if: ${{ github.event_name == 'push' }} | |
environment: | |
name: github-pages | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: website_dist | |
uses: actions/deploy-pages@v4 |