Update matrix #4
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: Build and Deploy Editor's Drafts | |
on: | |
push: | |
branches: [monorepo_history--accname] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
if: github.repository == 'w3c/aria' | |
strategy: | |
fail-fast: false | |
matrix: | |
spec: | |
- name: 'accname' | |
branch: 'gh-pages' | |
repo: w3c/accname | |
- name: core-aam | |
branch: 'gh-pages' | |
repo: w3c/core-aam | |
# Others to come | |
steps: | |
- name: Checkout monorepo | |
uses: actions/checkout@v4 | |
- name : Checkout deployment repositories | |
uses: actions/checkout@v4 | |
with: | |
repository: w3c/${{ matrix.spec.repo }} | |
ref: ${{ matrix.spec.branch }} | |
path: w3c/${{ matrix.spec.repo }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '>20.1.1' | |
- name: Install ReSpec | |
run: npm install -g respec@latest | |
- name: Build Respec | |
run: npx respec --src ${{ matrix.spec.name }}/index.html --out ${{ matrix.spec.name }}/Overview.html | |
- 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/w3c/aria/commit/${{ github.sha }}" || true | |
git push |