Skip to content

core-aam

core-aam #14

Workflow file for this run

name: Build and Deploy Editor's Drafts
on:
push:
branches: [$default-branch]
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
if: github.repository == 'daniel-montalvo/aria'
strategy:
matrix:
spec:
- name: core-aam
branch: 'gh-pages'
repo: daniel-montalvo/core-aam
- name: 'accname'
branch: 'gh-pages'
repo: daniel-montalvo/accname
# Others to come
steps:
- name: Checkout monorepo
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '>20.1.1'
- name: Install ReSpec
run: npm install -g respec@latest
- name: Build Respec
run: npm respec --src ${{ matrix.spec.name }}/index.html --out ${{ matrix.spec.name }}/Overview.html
- name : Checkout deployment
uses: actions/checkout@v2
with:
repository: ${{ matrix.spec.repository }}
ref: ${{ matrix.spec.branch }}
token: ${{ secrets.GITHUB_TOKEN }}
- name : Copy files
run: |
cp ./${{ matrix.spec.name }}/Overview.html ${{ matrix.spec.repository }}Overview.html
cp -r ./common/* ${{ matrix.spec.repository }}/common/*
- name: Push changes
run: |
cd ${{ matrix.spec.repository }}
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update ${{ matrix.spec.name }} -m Generated by https://github.com/daniel-montalvo/aria/commit/${{ github.sha }}" || true
git push