Skip to content

v5.6.0

v5.6.0 #27

name: Deploy Demo and Docs
on:
release:
types: [published]
jobs:
prod-builds:
name: Build (${{ matrix.try-scenario }})
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
try-scenario:
- plain-html
- bs4
- bs5
- docs
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Generate Production Build
run: |
sed -i "s|.*ENV\.rootURL.*|\t\tENV.rootURL = '/ember-models-table/v.5/${{ matrix.try-scenario }}/';|" ./tests/dummy/config/environment.js
pnpm run build:gh-pages:${{ matrix.try-scenario }}
tar -zcvf ${{ matrix.try-scenario }}.tar.gz dist
- name: Upload built project to artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.try-scenario }}.tar.gz
path: ${{ matrix.try-scenario }}.tar.gz
deploy:
needs: ["prod-builds"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 9
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: pnpm
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Download builds
uses: actions/download-artifact@v3
with:
path: builds
- name: Prepare builds
run: |
rm -rf "./v.5/"
mkdir "./v.5"
mkdir -p "./v.5/bs4" && tar -xf builds/bs4.tar.gz/bs4.tar.gz -C ./v.5/bs4
mv ./v.5/bs4/dist/* ./v.5/bs4/
mkdir -p "./v.5/bs5" && tar -xf builds/bs5.tar.gz/bs5.tar.gz -C ./v.5/bs5
mv ./v.5/bs5/dist/* ./v.5/bs5/
mkdir -p "./v.5/plain-html" && tar -xf builds/plain-html.tar.gz/plain-html.tar.gz -C ./v.5/plain-html
mv ./v.5/plain-html/dist/* ./v.5/plain-html/
mkdir -p "./v.5/docs" && tar -xf builds/docs.tar.gz/docs.tar.gz -C ./v.5/docs
mv ./v.5/docs/dist/* ./v.5/docs/
- name: Deploy to GitHub Pages
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: gh-pages
FOLDER: v.5
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TARGET_DIR: v.5