Update pages.yml #55
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: GitHub Pages | |
on: | |
push: | |
branches: | |
- main # Set a branch to deploy | |
- synolib2 # publish on change in either branch | |
permissions: | |
contents: write | |
jobs: | |
build-pages: | |
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. | |
runs-on: ubuntu-22.04 | |
steps: | |
# main / old: | |
- name: 'Checkout main branch' | |
uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Setup Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: prepare | |
run: | | |
mkdir build | |
cp index.html build/ | |
- run: deno bundle SynonymGroup.ts build/synonym-group.js | |
- run: cp SynonymGroup.ts build/ | |
# synolib2 / new: | |
- name: 'Checkout synolib2 branch' | |
uses: actions/checkout@v3 | |
with: | |
ref: synolib2 | |
path: 'synolib2' | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
- name: Draw the rest of the owl | |
run: | | |
cd synolib2 | |
npm ci | |
npm run example build | |
mkdir ../build/next | |
cp ./example/index.* ../build/next/ | |
cd .. | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
branch: gh-pages | |
folder: build |