Update NPM deps: Bump jquery.terminal from 2.42.0 to 2.42.1 in /schemius-web in the node-deps group #121
Workflow file for this run
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
name: Publish Web Page | |
on: | |
workflow_dispatch: | |
workflow_run: | |
workflows: | |
- Continuous Integration | |
types: | |
- completed | |
branches: | |
- main | |
pull_request: | |
types: [closed] | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/publish-web.yml' | |
- 'schemius-web/**.css' | |
- 'schemius-web/**.html' | |
- 'schemius-web/**.js' | |
env: | |
WORK_DIR: ./schemius-web | |
WEB_PAGE: index.html | |
WEB_PAGE_SOURCE: schemius.html | |
WEB_PAGE_JS: schemius.js | |
ARTIFACTS: artifacts | |
PUBLISH_DIR: ./dist | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
if: | | |
github.event_name == 'push' || | |
github.event_name == 'workflow_dispatch' || | |
github.event.workflow_run.conclusion == 'success' || | |
github.event.pull_request.merged == true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install rustup | |
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
- name: Produce WASM package | |
run: | | |
cargo install wasm-pack | |
rustup target add wasm32-unknown-unknown | |
wasm-pack build --release --target web | |
working-directory: ${{ env.WORK_DIR }} | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/Iron' | |
- name: Generate final web page | |
run: | | |
npm ci | |
cp $WEB_PAGE_SOURCE $WEB_PAGE | |
sed -i "s/DATETIME_PLACEHOLDER/$(date -u '+Published %F %H:%M:%S UTC')/g" $WEB_PAGE_JS | |
working-directory: ${{ env.WORK_DIR }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.ARTIFACTS }} | |
path: | | |
${{ env.WORK_DIR }}/${{ env.WEB_PAGE }} | |
${{ env.WORK_DIR }}/${{ env.WEB_PAGE_JS }} | |
${{ env.WORK_DIR }}/pkg | |
${{ env.WORK_DIR }}/node_modules | |
if-no-files-found: error | |
deploy: | |
name: Deploy | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ env.ARTIFACTS }} | |
path: ${{ env.PUBLISH_DIR }} | |
- name: Remove vicious .gitignore | |
run: rm ${{ env.PUBLISH_DIR }}/pkg/.gitignore | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ${{ env.PUBLISH_DIR }} |