Ship article website + install script with NPM library #1345 #35
Workflow file for this run
This file contains hidden or 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
name: test-deploy | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-22.04, macos-14] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- run: | | |
shopt -s extglob nullglob globstar | |
if: runner.os == 'Linux' | |
- name: run-test | |
run: | | |
yarn install | |
yarn install-article | |
set -x -e | |
yarn fluid bundle-website -w article -l | |
export PUPPETEER_CACHE_DIR=$GITHUB_WORKSPACE/ | |
# requires Puppeteer to be installed at same version as used in Fluid | |
yarn puppeteer browsers install chrome | |
yarn puppeteer browsers install firefox | |
yarn website-test article | |
deploy-website: | |
runs-on: ubuntu-22.04 | |
needs: test | |
# Use branch 'website' to experiment with deploy-website | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/website' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: build | |
run: | | |
yarn install | |
set -x -e | |
yarn fluid bundle-website article -l | |
- name: gh-pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: dist/article | |
keep_files: false |