Skip to content

CI: update publication flow. #114

CI: update publication flow.

CI: update publication flow. #114

Workflow file for this run

on:
push:
pull_request:
workflow_dispatch:
name: CI
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Install and build
run: |
npm ci
npm run minify
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
publish:
needs: build
if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
- name: Disable Jekyll
run: |
touch dist/.nojekyll
- name: Publish artifact to gh-pages branch in this repository
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
folder: dist/
branch: ${{ github.repository == 'amaranth-lang/playground' && 'pages' || 'gh-pages' }}
single-commit: true