Skip to content

Update workflow

Update workflow #1

Workflow file for this run

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:
matrix:
spec:
- name: 'accname'
branch: 'gh-pages'
repository: w3c/accname
path: 'w3c/accname'
- name: core-aam
branch: 'gh-pages'
repository: w3c/core-aam
path: '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.repository }}
ref: ${{ matrix.spec.branch }}
path: w3c/${{ matrix.spec.path }}
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-common/commit/${{ github.sha }}" || true"
git push